diff options
author | Dan Winship <danw@src.gnome.org> | 2001-03-27 00:01:33 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-03-27 00:01:33 +0800 |
commit | f1e4609adbcfa80e80bf569405d8ed6c21d31a60 (patch) | |
tree | c3c51f9d58a8dd036467c9693288c360d3812a42 /camel/providers/imap/camel-imap-command.c | |
parent | 91e0ec52dfbf24a381fe1fdabd05338b10c17ed2 (diff) | |
download | gsoc2013-evolution-f1e4609adbcfa80e80bf569405d8ed6c21d31a60.tar.gz 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-command.c')
-rw-r--r-- | camel/providers/imap/camel-imap-command.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index ac929b044a..b68216782c 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -87,12 +87,16 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, if (folder && (!fmt || folder != store->current_folder)) { CamelImapResponse *response; - store->current_folder = NULL; + if (store->current_folder) { + camel_object_unref (CAMEL_OBJECT (store->current_folder)); + store->current_folder = NULL; + } response = camel_imap_command (store, NULL, ex, "SELECT %S", folder->full_name); if (!response) return NULL; store->current_folder = folder; + camel_object_ref (CAMEL_OBJECT (folder)); camel_imap_folder_selected (folder, response, ex); if (!fmt) |