notmuch reply: Prevent GMIME assertion complaints for empty Reply-to header.

Apparently, GMime doesn't want to create a valid address list object
for an empty string. That's annoying, but it's easy enough to test for
the empty string and avoid the problem.
This commit is contained in:
Carl Worth 2010-02-04 12:32:28 -08:00
parent 82e47ec92b
commit 62379f3dee

View file

@ -207,6 +207,9 @@ mailing_list_munged_reply_to (notmuch_message_t *message)
InternetAddressMailbox *mailbox; InternetAddressMailbox *mailbox;
header = notmuch_message_get_header (message, "reply-to"); header = notmuch_message_get_header (message, "reply-to");
if (*header == '\0')
return 0;
list = internet_address_list_parse_string (header); list = internet_address_list_parse_string (header);
if (internet_address_list_length (list) != 1) if (internet_address_list_length (list) != 1)