aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index 189df5dc5..fb15840e9 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -1132,6 +1132,11 @@ contact_list_store_remove_contact (EmpathyContactListStore *store,
return;
}
+ /* GtkTreeRowReference owns a ref on the store so removing it from the cache
+ * may drop our latest reference on the store. Ref it to be sure it stays
+ * alive during all the process. */
+ g_object_ref (store);
+
/* Clean up model */
model = GTK_TREE_MODEL (store);
@@ -1166,6 +1171,8 @@ contact_list_store_remove_contact (EmpathyContactListStore *store,
}
g_hash_table_remove (priv->empathy_contact_cache, contact);
+
+ g_object_unref (store);
}
static void