From c134c41bcdd826228f697c11ab4b375b65bd97fa Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 16 Nov 2013 17:49:52 -0500 Subject: EMFolderTreeModel: Declare the CamelStore column as an object type. Declaring the CamelStore column as a raw pointer type dates back to before Camel was GObject-based. The problem is the CamelStore could be finalized while the tree model still has a pointer to it, leaving behind dangling pointers in the tree model which could cause a crash. Declaring the column type in the column enum turned out to be a good idea, as it makes code that needs updated easy to find. This renames the enum value from COL_POINTER_CAMEL_STORE to COL_OBJECT_CAMEL_STORE. --- mail/em-folder-utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mail/em-folder-utils.c') diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index 5633abc8f8..93225d584b 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -450,10 +450,11 @@ emfu_copy_folder_exclude (EMFolderTree *tree, gtk_tree_model_get ( model, iter, COL_UINT_FLAGS, &flags, - COL_POINTER_CAMEL_STORE, &store, -1); + COL_OBJECT_CAMEL_STORE, &store, -1); uid = camel_service_get_uid (CAMEL_SERVICE (store)); tovfolder = (g_strcmp0 (uid, E_MAIL_SESSION_VFOLDER_UID) == 0); + g_object_unref (store); /* moving from vfolder to normal- not allowed */ if (fromvfolder && !tovfolder && cfd->delete) -- cgit v1.2.3