aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-08-11 05:20:46 +0800
committerChris Lahey <clahey@src.gnome.org>2000-08-11 05:20:46 +0800
commit95ca99cbf6db33025f095af1d1be1261a5cf0d71 (patch)
tree1c7f4043f5fe677516996e8a42bf0b176d0546d7 /addressbook
parentb0dbbe72aca6564f1fd1696d88aa805d4a702438 (diff)
downloadgsoc2013-evolution-95ca99cbf6db33025f095af1d1be1261a5cf0d71.tar.gz
gsoc2013-evolution-95ca99cbf6db33025f095af1d1be1261a5cf0d71.tar.zst
gsoc2013-evolution-95ca99cbf6db33025f095af1d1be1261a5cf0d71.zip
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
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/backend/pas/pas-backend-file.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index b93978d764..86bae311de 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -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
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index 36310e0f43..fc67c4c0d8 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -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;
}