]> git.notmuchmail.org Git - notmuch/blobdiff - lib/thread.cc
fix obvious cut and paste error
[notmuch] / lib / thread.cc
index ec80f8518b9ebe7856db7a5a78cea474baf53e9f..48c070e6ce2261eff809c44ad1d490246474203a 100644 (file)
@@ -236,7 +236,7 @@ _notmuch_thread_create (void *ctx,
        return NULL;
 
     matched_query = notmuch_query_create (notmuch, matched_query_string);
-    if (unlikely (thread_id_query == NULL))
+    if (unlikely (matched_query == NULL))
        return NULL;
 
     thread = talloc (ctx, notmuch_thread_t);
@@ -278,7 +278,6 @@ _notmuch_thread_create (void *ctx,
     }
 
     notmuch_query_destroy (thread_id_query);
-
     for (messages = notmuch_query_search_messages (matched_query);
         notmuch_messages_valid (messages);
         notmuch_messages_move_to_next (messages))