X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fthread.cc;h=48c070e6ce2261eff809c44ad1d490246474203a;hp=ec80f8518b9ebe7856db7a5a78cea474baf53e9f;hb=9ddde6eb14c126e314d90e2e08f213fb81f0457f;hpb=4e5d2f22db290a830c0267f34b519c6138af00ed diff --git a/lib/thread.cc b/lib/thread.cc index ec80f851..48c070e6 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -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))