aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2008-02-20 02:52:03 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2008-02-20 02:52:03 +0800
commitbbdb1887e18ddc02f0260067e68bb3e76dc101a2 (patch)
tree9c492516e68564f6acb75d79f4ccb2164d5fb824 /addressbook/gui/widgets
parent77bf0ad0c741d1fca21fe47688986d9846565ca9 (diff)
downloadgsoc2013-evolution-bbdb1887e18ddc02f0260067e68bb3e76dc101a2.tar
gsoc2013-evolution-bbdb1887e18ddc02f0260067e68bb3e76dc101a2.tar.gz
gsoc2013-evolution-bbdb1887e18ddc02f0260067e68bb3e76dc101a2.tar.bz2
gsoc2013-evolution-bbdb1887e18ddc02f0260067e68bb3e76dc101a2.tar.lz
gsoc2013-evolution-bbdb1887e18ddc02f0260067e68bb3e76dc101a2.tar.xz
gsoc2013-evolution-bbdb1887e18ddc02f0260067e68bb3e76dc101a2.tar.zst
gsoc2013-evolution-bbdb1887e18ddc02f0260067e68bb3e76dc101a2.zip
** Fix for bug #517458
2008-02-20 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #517458 * gui/widgets/e-addressbook-reflow-adapter.c: (addressbook_compare): Handle broken UIDs. svn path=/trunk/; revision=35054
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index 06caebedee..345a4e9c8b 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -181,6 +181,7 @@ addressbook_compare (EReflowModel *erm, int n1, int n2)
if (contact1 && contact2) {
const char *file_as1, *file_as2;
+ const char *uid1, *uid2;
file_as1 = e_contact_get_const (contact1, E_CONTACT_FILE_AS);
file_as2 = e_contact_get_const (contact2, E_CONTACT_FILE_AS);
if (file_as1 && file_as2)
@@ -189,8 +190,14 @@ addressbook_compare (EReflowModel *erm, int n1, int n2)
return -1;
if (file_as2)
return 1;
- return strcmp(e_contact_get_const (contact1, E_CONTACT_UID),
- e_contact_get_const (contact2, E_CONTACT_UID));
+ uid1 = e_contact_get_const (contact1, E_CONTACT_UID);
+ uid2 = e_contact_get_const (contact2, E_CONTACT_UID);
+ if (uid1 && uid2)
+ return strcmp(uid1, uid2);
+ if (uid1)
+ return -1;
+ if (uid2)
+ return 1;
}
if (contact1)
return -1;