aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index b4c01110ea..eb0c61e0f8 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -961,6 +961,10 @@ delete_folder (CamelStore *store, const char *folder_name, CamelException *ex)
response = camel_imap_command (imap_store, NULL, ex, "SELECT INBOX");
if (response) {
camel_imap_response_free (imap_store, response);
+
+ if (imap_store->current_folder)
+ camel_object_unref (CAMEL_OBJECT (imap_store->current_folder));
+ /* no need to actually create a CamelFolder for INBOX */
imap_store->current_folder = NULL;
} else
return;