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.
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);