X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fquery.cc;h=60ff8bd9a39e1707e12a4e96cff99890b00d669b;hp=ec60e2e45c01226a9ed326b8af22f1add8b77c8b;hb=29f125212619ebca8621dd2106b412b22e1b6d22;hpb=5c526d1737212dd736b1c3fedc6bf5b3493ce436 diff --git a/lib/query.cc b/lib/query.cc index ec60e2e4..60ff8bd9 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -462,6 +462,9 @@ notmuch_threads_valid (notmuch_threads_t *threads) { unsigned int doc_id; + if (! threads) + return FALSE; + while (threads->doc_id_pos < threads->doc_ids->len) { doc_id = g_array_index (threads->doc_ids, unsigned int, threads->doc_id_pos);