Avoid complaints about empty address lists.

This commit is contained in:
Carl Worth 2009-10-14 17:09:30 -07:00
parent bae1ce09a3
commit 48d2e2dc44

View file

@ -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);