This avoids erroneously calling internet_address_list_length() with a
NULL list (which was causing a gmime exception).

Signed-off-by: Jed Brown <[email protected]>
---
 notmuch-reply.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/notmuch-reply.c b/notmuch-reply.c
index 9b9e9ab..6c9118e 100644
--- a/notmuch-reply.c
+++ b/notmuch-reply.c
@@ -202,7 +202,7 @@ mailing_list_munged_reply_to (notmuch_message_t *message)
 
     header = notmuch_message_get_header (message, "reply-to");
     list = internet_address_list_parse_string (header);
-    if (internet_address_list_length (list) != 1)
+    if (list == NULL || internet_address_list_length (list) != 1)
        return 0;
     address = internet_address_list_get_address (list, 0);
     if (INTERNET_ADDRESS_IS_GROUP (address))
-- 
1.6.5.3

_______________________________________________
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to