aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2004-09-30 03:21:11 +0800
committerHans Petter <hansp@src.gnome.org>2004-09-30 03:21:11 +0800
commit81be4634777d39411437c1e7c516a63365452418 (patch)
tree092fcc5b89a3ab59bdfc123cd3216815cc87cd72
parent08d34b31d98a06e7ad9571e1f74f0c43a23cee63 (diff)
downloadgsoc2013-evolution-81be4634777d39411437c1e7c516a63365452418.tar
gsoc2013-evolution-81be4634777d39411437c1e7c516a63365452418.tar.gz
gsoc2013-evolution-81be4634777d39411437c1e7c516a63365452418.tar.bz2
gsoc2013-evolution-81be4634777d39411437c1e7c516a63365452418.tar.lz
gsoc2013-evolution-81be4634777d39411437c1e7c516a63365452418.tar.xz
gsoc2013-evolution-81be4634777d39411437c1e7c516a63365452418.tar.zst
gsoc2013-evolution-81be4634777d39411437c1e7c516a63365452418.zip
Fixes bug #65537.
2004-09-29 Hans Petter Jansson <hpj@ximian.com> Fixes bug #65537. * gui/merging/eab-contact-compare.c (query_cb): Protect against NULL UIDs, and make fewer calls to e_contact_get_const () as a bonus. svn path=/trunk/; revision=27428
-rw-r--r--addressbook/ChangeLog7
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c15
2 files changed, 20 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index eb3e556e49..09891b18a9 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,10 @@
+2004-09-29 Hans Petter Jansson <hpj@ximian.com>
+
+ Fixes bug #65537.
+
+ * gui/merging/eab-contact-compare.c (query_cb): Protect against NULL
+ UIDs, and make fewer calls to e_contact_get_const () as a bonus.
+
2004-09-24 Hao Sheng <hao.sheng@sun.com>
Fix for #66523
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index bc68784ed7..4244f3fbff 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -613,11 +613,22 @@ query_cb (EBook *book, EBookStatus status, GList *contacts, gpointer closure)
/* remove the contacts we're to avoid from the list, if they're present */
for (i = contacts; i != NULL; i = g_list_next (i)) {
EContact *this_contact = E_CONTACT (i->data);
+ const gchar *this_uid;
GList *iterator;
gboolean avoid = FALSE;
+
+ this_uid = e_contact_get_const (this_contact, E_CONTACT_UID);
+ if (!this_uid)
+ continue;
+
for (iterator = info->avoid; iterator; iterator = iterator->next) {
- if (!strcmp (e_contact_get_const (iterator->data, E_CONTACT_UID),
- e_contact_get_const (this_contact, E_CONTACT_UID))) {
+ const gchar *avoid_uid;
+
+ avoid_uid = e_contact_get_const (iterator->data, E_CONTACT_UID);
+ if (!avoid_uid)
+ continue;
+
+ if (!strcmp (avoid_uid, this_uid)) {
avoid = TRUE;
break;
}