aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-27 00:01:33 +0800
committerDan Winship <danw@src.gnome.org>2001-03-27 00:01:33 +0800
commitf1e4609adbcfa80e80bf569405d8ed6c21d31a60 (patch)
treec3c51f9d58a8dd036467c9693288c360d3812a42 /camel/providers/imap/camel-imap-store.c
parent91e0ec52dfbf24a381fe1fdabd05338b10c17ed2 (diff)
downloadgsoc2013-evolution-f1e4609adbcfa80e80bf569405d8ed6c21d31a60.tar
gsoc2013-evolution-f1e4609adbcfa80e80bf569405d8ed6c21d31a60.tar.gz
gsoc2013-evolution-f1e4609adbcfa80e80bf569405d8ed6c21d31a60.tar.bz2
gsoc2013-evolution-f1e4609adbcfa80e80bf569405d8ed6c21d31a60.tar.lz
gsoc2013-evolution-f1e4609adbcfa80e80bf569405d8ed6c21d31a60.tar.xz
gsoc2013-evolution-f1e4609adbcfa80e80bf569405d8ed6c21d31a60.tar.zst
gsoc2013-evolution-f1e4609adbcfa80e80bf569405d8ed6c21d31a60.zip
keep a reference on the store's current_folder.
* providers/imap/camel-imap-command.c (camel_imap_command): keep a reference on the store's current_folder. * providers/imap/camel-imap-store.c (camel_imap_store_finalize): (imap_disconnect): unref the current_folder before clearing it. svn path=/trunk/; revision=8945
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index fa7fac480a..de68eebbca 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -143,6 +143,8 @@ camel_imap_store_finalize (CamelObject *object)
}
if (imap_store->namespace)
g_free (imap_store->namespace);
+ if (imap_store->current_folder)
+ camel_object_unref (CAMEL_OBJECT (imap_store->current_folder));
#ifdef ENABLE_THREADS
e_mutex_destroy(imap_store->priv->command_lock);
#endif
@@ -724,7 +726,10 @@ imap_disconnect (CamelService *service, gboolean clean, CamelException *ex)
camel_imap_response_free (response);
}
store->connected = FALSE;
- store->current_folder = NULL;
+ if (store->current_folder) {
+ camel_object_unref (CAMEL_OBJECT (store->current_folder));
+ store->current_folder = NULL;
+ }
if (store->subscribed_folders) {
g_hash_table_foreach_remove (store->subscribed_folders,