aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-10 20:40:06 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-08-10 20:50:37 +0800
commit90e4a46478e5c39b51bfd36bc252c10e9cd60865 (patch)
tree8ef552383a3ff08b9ec6accd909af5ded5779752 /mail
parentee0e032258fc9178ca7ef660aa8aa3b184cff55f (diff)
downloadgsoc2013-evolution-90e4a46478e5c39b51bfd36bc252c10e9cd60865.tar
gsoc2013-evolution-90e4a46478e5c39b51bfd36bc252c10e9cd60865.tar.gz
gsoc2013-evolution-90e4a46478e5c39b51bfd36bc252c10e9cd60865.tar.bz2
gsoc2013-evolution-90e4a46478e5c39b51bfd36bc252c10e9cd60865.tar.lz
gsoc2013-evolution-90e4a46478e5c39b51bfd36bc252c10e9cd60865.tar.xz
gsoc2013-evolution-90e4a46478e5c39b51bfd36bc252c10e9cd60865.tar.zst
gsoc2013-evolution-90e4a46478e5c39b51bfd36bc252c10e9cd60865.zip
EMFolderTreeModel: Avoid a potential refcount crash.
Diffstat (limited to 'mail')
-rw-r--r--mail/em-folder-tree-model.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index eb6239e22a..bbf9dd558c 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -1155,8 +1155,14 @@ em_folder_tree_model_remove_folders (EMFolderTreeModel *model,
gtk_tree_store_remove ((GtkTreeStore *) model, toplevel);
- if (is_store)
+ /* Freeing the GtkTreeRowReference in the store info may finalize
+ * the model. Keep the model alive until the store info is fully
+ * removed from the hash table. */
+ if (is_store) {
+ g_object_ref (model);
g_hash_table_remove (model->priv->store_index, si->store);
+ g_object_unref (model);
+ }
g_free (full_name);
g_free (uri);