]> git.notmuchmail.org Git - notmuch/blobdiff - lib/message.cc
lib: Clean up error handling in _notmuch_thread_create
[notmuch] / lib / message.cc
index 978de066d4185ee991794bfad1f50140dd9424d6..320901f77eb010a1cab4502c79db6faccbc6d49c 100644 (file)
@@ -788,7 +788,9 @@ notmuch_message_get_tags (notmuch_message_t *message)
      * possible to modify the message tags (which talloc_unlink's the
      * current list from the message) while still iterating because
      * the iterator will keep the current list alive. */
-    talloc_reference (message, message->tag_list);
+    if (!talloc_reference (message, message->tag_list))
+       return NULL;
+
     return tags;
 }