From: Carl Worth Date: Thu, 15 Oct 2009 00:09:30 +0000 (-0700) Subject: Avoid complaints about empty address lists. X-Git-Tag: 0.1~858 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=48d2e2dc440d49d7305324c25460e98d5fa40bda;p=notmuch.git Avoid complaints about empty address lists. --- 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);