aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-09-09 18:49:46 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-09-09 18:57:07 +0800
commit683c88254e5488ef7b0d8d0e0fd05f46c41f5914 (patch)
tree9edbcf311d55a47e95e88a085e4eccbc5f2314b8
parentc4051a34512dd7daeca7f1fa2e84d5d05805601a (diff)
downloadgsoc2013-empathy-683c88254e5488ef7b0d8d0e0fd05f46c41f5914.tar
gsoc2013-empathy-683c88254e5488ef7b0d8d0e0fd05f46c41f5914.tar.gz
gsoc2013-empathy-683c88254e5488ef7b0d8d0e0fd05f46c41f5914.tar.bz2
gsoc2013-empathy-683c88254e5488ef7b0d8d0e0fd05f46c41f5914.tar.lz
gsoc2013-empathy-683c88254e5488ef7b0d8d0e0fd05f46c41f5914.tar.xz
gsoc2013-empathy-683c88254e5488ef7b0d8d0e0fd05f46c41f5914.tar.zst
gsoc2013-empathy-683c88254e5488ef7b0d8d0e0fd05f46c41f5914.zip
contact_list_store_remove_contact: ensure that the store stays alive during the process
https://bugzilla.gnome.org/show_bug.cgi?id=658644
-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