From 48d2e2dc440d49d7305324c25460e98d5fa40bda Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 14 Oct 2009 17:09:30 -0700 Subject: [PATCH] Avoid complaints about empty address lists. --- notmuch-index-message.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/notmuch-index-message.cc b/notmuch-index-message.cc index 4585a3b9..efc7eb14 100644 --- a/notmuch-index-message.cc +++ b/notmuch-index-message.cc @@ -204,6 +204,9 @@ gen_terms_address_names (Xapian::TermGenerator term_gen, int i; InternetAddress *address; + if (addresses == NULL) + return; + for (i = 0; i < internet_address_list_length (addresses); i++) { address = internet_address_list_get_address (addresses, i); gen_terms_address_name (term_gen, address, address_type); @@ -234,6 +237,9 @@ add_terms_address_addrs (Xapian::Document doc, int i; InternetAddress *address; + if (addresses == NULL) + return; + for (i = 0; i < internet_address_list_length (addresses); i++) { address = internet_address_list_get_address (addresses, i); add_term_address_addr (doc, address, address_type); -- 2.26.2