diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-09 18:51:33 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-09 18:57:07 +0800 |
commit | 56f569b22192230080eb6c20d0d5474fa7e47086 (patch) | |
tree | e82f61fc9fb69a5ad31ab66d8cb5118bb92e4cc1 | |
parent | 683c88254e5488ef7b0d8d0e0fd05f46c41f5914 (diff) | |
download | gsoc2013-empathy-56f569b22192230080eb6c20d0d5474fa7e47086.tar.gz gsoc2013-empathy-56f569b22192230080eb6c20d0d5474fa7e47086.tar.zst gsoc2013-empathy-56f569b22192230080eb6c20d0d5474fa7e47086.zip |
individual_store_remove_individual: ensure that the store stays alive during the process
https://bugzilla.gnome.org/show_bug.cgi?id=658644
-rw-r--r-- | libempathy-gtk/empathy-individual-store.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c index d80d292d0..943dd5b8d 100644 --- a/libempathy-gtk/empathy-individual-store.c +++ b/libempathy-gtk/empathy-individual-store.c @@ -378,6 +378,11 @@ individual_store_remove_individual (EmpathyIndividualStore *self, if (!row_refs) 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 (self); + /* Clean up model */ model = GTK_TREE_MODEL (self); @@ -417,6 +422,8 @@ individual_store_remove_individual (EmpathyIndividualStore *self, } g_hash_table_remove (priv->folks_individual_cache, individual); + + g_object_unref (self); } static void |