]> git.notmuchmail.org Git - notmuch/blobdiff - lib/thread.cc
lib: add _notmuch_message_list_empty
[notmuch] / lib / thread.cc
index 6d15c49b761b2fc81e36a1f2adfd8e6c07dff4e7..a0ce4be3cd46067ce067681245abe306d9a94837 100644 (file)
@@ -425,7 +425,7 @@ _resolve_thread_relationships (notmuch_thread_t *thread)
     if (first_node) {
        message = first_node->message;
        in_reply_to = _notmuch_message_get_in_reply_to (message);
     if (first_node) {
        message = first_node->message;
        in_reply_to = _notmuch_message_get_in_reply_to (message);
-       if (thread->toplevel_list->head &&
+       if (! _notmuch_message_list_empty (thread->toplevel_list) &&
            in_reply_to && strlen (in_reply_to) &&
            g_hash_table_lookup_extended (thread->message_hash,
                                          in_reply_to, NULL,
            in_reply_to && strlen (in_reply_to) &&
            g_hash_table_lookup_extended (thread->message_hash,
                                          in_reply_to, NULL,