aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-06-20 03:06:07 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-06-20 03:06:11 +0800
commitfb06bf8e12d112645433eb7ed2bd9ffb82980278 (patch)
treeccf9f8052fdb74ba9b6c3a8cc5a5939f45e368fa /libempathy-gtk
parent813e42dcf617f97e0ed0cdc7a77ad428d5b87ef2 (diff)
downloadgsoc2013-empathy-fb06bf8e12d112645433eb7ed2bd9ffb82980278.tar
gsoc2013-empathy-fb06bf8e12d112645433eb7ed2bd9ffb82980278.tar.gz
gsoc2013-empathy-fb06bf8e12d112645433eb7ed2bd9ffb82980278.tar.bz2
gsoc2013-empathy-fb06bf8e12d112645433eb7ed2bd9ffb82980278.tar.lz
gsoc2013-empathy-fb06bf8e12d112645433eb7ed2bd9ffb82980278.tar.xz
gsoc2013-empathy-fb06bf8e12d112645433eb7ed2bd9ffb82980278.tar.zst
gsoc2013-empathy-fb06bf8e12d112645433eb7ed2bd9ffb82980278.zip
Pick the right sort function early
We can't assume that the group and seperator sorting function never returns 0, so don't use that to imply that both A and B are contacts. Instead just check if A and B are contacts...
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index 8916761d4..98cd81b5d 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -1691,10 +1691,10 @@ contact_list_store_name_sort_func (GtkTreeModel *model,
EMPATHY_CONTACT_LIST_STORE_COL_IS_FAKE_GROUP, &fake_group_b,
-1);
- ret_val = compare_separator_and_groups (is_separator_a, is_separator_b,
- name_a, name_b, contact_a, contact_b, fake_group_a, fake_group_b);
-
- if (ret_val == 0)
+ if (contact_a == NULL || contact_b == NULL)
+ ret_val = compare_separator_and_groups (is_separator_a, is_separator_b,
+ name_a, name_b, contact_a, contact_b, fake_group_a, fake_group_b);
+ else
ret_val = contact_list_store_contact_sort (contact_a, contact_b);
if (contact_a) {