aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r--camel/camel-store.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c
index e023460bf6..35adf8c6cd 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -333,12 +333,13 @@ camel_store_delete_folder (CamelStore *store, const char *folder_name, CamelExce
}
CS_CLASS (store)->delete_folder (store, folder_name, ex);
-
- if (store->folders)
- camel_object_bag_remove(store->folders, folder);
-
- if (folder)
- camel_object_unref(folder);
+
+ if (folder) {
+ if (store->folders)
+ camel_object_bag_remove (store->folders, folder);
+
+ camel_object_unref (folder);
+ }
CAMEL_STORE_UNLOCK(store, folder_lock);
}