There is not too much point in worrying about the bad error reporting
here, because the count api is due for the same deprecation.
GHashTable *hash;
unsigned int count;
notmuch_sort_t sort;
+ notmuch_status_t status;
sort = query->sort;
query->sort = NOTMUCH_SORT_UNSORTED;
- messages = notmuch_query_search_messages (query);
+ status = notmuch_query_search_messages_st (query, &messages);
+ if (status)
+ return 0;
+
query->sort = sort;
if (messages == NULL)
return 0;