notmuch reply: Prevent GMIME assertion complaints for empty Reply-to header.
authorCarl Worth <cworth@cworth.org>
Thu, 4 Feb 2010 20:32:28 +0000 (12:32 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 4 Feb 2010 20:42:09 +0000 (12:42 -0800)
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.

notmuch-reply.c

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