X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fquery.cc;h=59f4011b31d3a3f5616227d352b8f7234b05ee0f;hp=d241dc1dc819a6246e2bfc791330c5448dc9548e;hb=f6cb896bc4c0bafca1acd5ac3fb45169cd893e29;hpb=138fd38afe6c6d44179952dd17c4b07e9223ad37 diff --git a/lib/query.cc b/lib/query.cc index d241dc1d..59f4011b 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -249,6 +249,10 @@ notmuch_query_search_threads (notmuch_query_t *query) free, NULL); threads->messages = notmuch_query_search_messages (query); + if (threads->messages == NULL) { + talloc_free (threads); + return NULL; + } threads->thread_id = NULL;