aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-06-20 03:38:03 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-06-20 03:38:07 +0800
commit733ae445e0f0c79b13de25e408957f23ed9a53a9 (patch)
treee035aedfb5fa3d7b95d19f1db90a56d14370c13e
parent96a20bbc3f491b9f6bfa00401beb4cf24b7a200c (diff)
downloadgsoc2013-empathy-733ae445e0f0c79b13de25e408957f23ed9a53a9.tar
gsoc2013-empathy-733ae445e0f0c79b13de25e408957f23ed9a53a9.tar.gz
gsoc2013-empathy-733ae445e0f0c79b13de25e408957f23ed9a53a9.tar.bz2
gsoc2013-empathy-733ae445e0f0c79b13de25e408957f23ed9a53a9.tar.lz
gsoc2013-empathy-733ae445e0f0c79b13de25e408957f23ed9a53a9.tar.xz
gsoc2013-empathy-733ae445e0f0c79b13de25e408957f23ed9a53a9.tar.zst
gsoc2013-empathy-733ae445e0f0c79b13de25e408957f23ed9a53a9.zip
Rely on compare_separator_and_groups when either A or B isn't a contact
We can't rely on the fact that compare_separator_and_groups only returns 0 in the case it compares two contacts. But we can completely rely on its result if we give it at least one non-contact.
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index d5969c87b..de838441f 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -1630,10 +1630,9 @@ contact_list_store_state_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);
goto free_and_out;
}