X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-show.c;h=d416fbd5ccb73593ec44fd976bd331de0bf13be6;hp=528694be91932aa5b83c77933bfe48ffa8aebde4;hb=3fed6736a7ef8b8b1f05d0fabb136bdd3b5917ee;hpb=c7453773064efbd0b2cd17b15ba483edbd28ce1e diff --git a/notmuch-show.c b/notmuch-show.c index 528694be..d416fbd5 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1015,9 +1015,13 @@ do_show (void *ctx, notmuch_messages_t *messages; notmuch_status_t status, res = NOTMUCH_STATUS_SUCCESS; + threads = notmuch_query_search_threads (query); + if (! threads) + return 1; + sp->begin_list (sp); - for (threads = notmuch_query_search_threads (query); + for ( ; notmuch_threads_valid (threads); notmuch_threads_move_to_next (threads)) {