--- lib/notmuch.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/notmuch.h b/lib/notmuch.h index aa032e09..00f69846 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -892,7 +892,12 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag); * * query = notmuch_query_create (database, query_string); * - * for (threads = notmuch_query_search_threads (query); + * notmuch_status_t stat = notmuch_query_search_threads (query, &threads); + * if (stat != NOTMUCH_STATUS_SUCCESS) { + * goto exit; + * } + * + * for (; * notmuch_threads_valid (threads); * notmuch_threads_move_to_next (threads)) * { @@ -901,6 +906,7 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag); * notmuch_thread_destroy (thread); * } * + * exit: * notmuch_query_destroy (query); * * Note: If you are finished with a thread before its containing -- 2.17.2 _______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch