aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/ebook/e-card.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index 8c75acddcc..762b5f2141 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -1780,6 +1780,9 @@ e_card_email_match_string (const ECard *card, const gchar *str)
g_return_val_if_fail (card && E_IS_CARD (card), FALSE);
g_return_val_if_fail (str != NULL, FALSE);
+ if (!card->email)
+ return FALSE;
+
iter = e_list_get_iterator (card->email);
for (e_iterator_reset (iter); e_iterator_is_valid (iter); e_iterator_next (iter)) {
if (e_card_email_match_single_string (e_iterator_get (iter), str))
@@ -1799,6 +1802,9 @@ e_card_email_find_number (const ECard *card, const gchar *email)
g_return_val_if_fail (E_IS_CARD (card), -1);
g_return_val_if_fail (email != NULL, -1);
+ if (!card->email)
+ return -1;
+
iter = e_list_get_iterator (card->email);
for (e_iterator_reset (iter); e_iterator_is_valid (iter); e_iterator_next (iter)) {
if (!g_strcasecmp (e_iterator_get (iter), email))