Fixed any search to not crash on missing phone numbers or email addresses.

2000-08-10  Christopher James Lahey  <clahey@helixcode.com>

	* backend/pas/pas-backend-file.c: Fixed any search to not crash on
	missing phone numbers or email addresses.

svn path=/trunk/; revision=4704
This commit is contained in:
Christopher James Lahey
2000-08-10 21:20:46 +00:00
committed by Chris Lahey
parent b0dbbe72ac
commit 95ca99cbf6
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2000-08-10 Christopher James Lahey <clahey@helixcode.com>
* backend/pas/pas-backend-file.c: Fixed any search to not crash on
missing phone numbers or email addresses.
2000-08-09 Christopher James Lahey <clahey@helixcode.com>
* gui/minicard/e-minicard-control.c: Added a button to save to

View File

@ -165,7 +165,7 @@ compare_email (ECardSimple *card, const char *str,
for (i = E_CARD_SIMPLE_EMAIL_ID_EMAIL; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i ++) {
const char *email = e_card_simple_get_email (card, i);
if (compare(email, str))
if (email && compare(email, str))
return TRUE;
}
@ -181,7 +181,7 @@ compare_phone (ECardSimple *card, const char *str,
for (i = E_CARD_SIMPLE_PHONE_ID_ASSISTANT; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++) {
const ECardPhone *phone = e_card_simple_get_phone (card, i);
if (compare(phone->number, str))
if (phone && compare(phone->number, str))
return TRUE;
}