[evolution/wip/gsettings] EMFolderTreeModel: Avoid a potential refcount crash.
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/gsettings] EMFolderTreeModel: Avoid a potential refcount crash.
- Date: Wed, 14 Sep 2011 12:24:49 +0000 (UTC)
commit bae19960b300c3f39ca093f51576621aacbbc84f
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Aug 10 08:40:06 2011 -0400
EMFolderTreeModel: Avoid a potential refcount crash.
mail/em-folder-tree-model.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index eb6239e..bbf9dd5 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]