diff options
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index 07f39faca5..7de338cb95 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -1382,10 +1382,8 @@ mail_lookup_storage (CamelStore *store) static void store_disconnect(CamelStore *store, void *event_data, void *data) { - if (store) { - camel_service_disconnect (CAMEL_SERVICE (store), TRUE, NULL); - camel_object_unref (CAMEL_OBJECT (store)); - } + camel_service_disconnect (CAMEL_SERVICE (store), TRUE, NULL); + camel_object_unref (CAMEL_OBJECT (store)); } void @@ -1402,6 +1400,9 @@ mail_remove_storage (CamelStore *store) */ storage = g_hash_table_lookup (storages_hash, store); + if (!storage) + return; + g_hash_table_remove (storages_hash, store); /* so i guess potentially we could have a race, add a store while one |