diff options
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r-- | camel/camel-store.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c index 35adf8c6cd..852851f51b 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -1021,11 +1021,12 @@ camel_store_unsubscribe_folder (CamelStore *store, CS_CLASS (store)->unsubscribe_folder (store, folder_name, ex); - if (store->folders) - camel_object_bag_remove(store->folders, folder); + if (folder) { + if (store->folders) + camel_object_bag_remove(store->folders, folder); - if (folder) camel_object_unref(folder); + } CAMEL_STORE_UNLOCK(store, folder_lock); } |