X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fquery.cc;h=60ff8bd9a39e1707e12a4e96cff99890b00d669b;hp=ec60e2e45c01226a9ed326b8af22f1add8b77c8b;hb=1e5b4b72c928d2ed8243be2b4edc20e60e9bd158;hpb=fd733a4f5c41948b895e37daf9bc0912f695ae59 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);