diff options
author | Dan Winship <danw@src.gnome.org> | 2002-10-16 01:54:00 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-10-16 01:54:00 +0800 |
commit | b31ab22f04c171ec7e32a8f188ffcefe5b396ffc (patch) | |
tree | 0722a778a07ffccf646a36e5d138538827585c8a | |
parent | 00f836ea75d6cbcf116aa5223f6123409f395a1d (diff) | |
download | gsoc2013-evolution-b31ab22f04c171ec7e32a8f188ffcefe5b396ffc.tar gsoc2013-evolution-b31ab22f04c171ec7e32a8f188ffcefe5b396ffc.tar.gz gsoc2013-evolution-b31ab22f04c171ec7e32a8f188ffcefe5b396ffc.tar.bz2 gsoc2013-evolution-b31ab22f04c171ec7e32a8f188ffcefe5b396ffc.tar.lz gsoc2013-evolution-b31ab22f04c171ec7e32a8f188ffcefe5b396ffc.tar.xz gsoc2013-evolution-b31ab22f04c171ec7e32a8f188ffcefe5b396ffc.tar.zst gsoc2013-evolution-b31ab22f04c171ec7e32a8f188ffcefe5b396ffc.zip |
Return right away rather than crashing if card->email is NULL.
* backend/ebook/e-card.c (e_card_email_match_string): Return right
away rather than crashing if card->email is NULL.
(e_card_email_find_number): Likewise.
svn path=/trunk/; revision=18370
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 1a8386ebe0..c67db48937 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2002-10-15 Dan Winship <danw@ximian.com> + + * backend/ebook/e-card.c (e_card_email_match_string): Return right + away rather than crashing if card->email is NULL. + (e_card_email_find_number): Likewise. + 2002-10-10 Kjartan Maraas <kmaraas@gnome.org> [ Fix #7094, #7064, #7095, #31944, #31945 ] 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)) |