mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
notmuch show: Detect an internal error if a thread has no messages.
This really should be impossible---if there are no messages, then what was the thread object created from? During recent debugging, it was useful to have this error detected and reported.
This commit is contained in:
parent
64c03ae97f
commit
58b659f893
1 changed files with 4 additions and 0 deletions
|
@ -211,6 +211,10 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[]))
|
|||
|
||||
messages = notmuch_thread_get_toplevel_messages (thread);
|
||||
|
||||
if (messages == NULL)
|
||||
INTERNAL_ERROR ("Thread %s has no toplevel messages.\n",
|
||||
notmuch_thread_get_thread_id (thread));
|
||||
|
||||
show_messages (ctx, messages, 0);
|
||||
|
||||
notmuch_thread_destroy (thread);
|
||||
|
|
Loading…
Reference in a new issue