diff options
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index f429ef6a76..5e7cd62bf6 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -1757,10 +1757,11 @@ unsubscribe_folder (CamelStore *store, const char *folder_name, return; camel_imap_response_free (imap_store, response); - g_hash_table_lookup_extended (imap_store->subscribed_folders, - folder_name, &key, &value); - g_hash_table_remove (imap_store->subscribed_folders, folder_name); - g_free (key); + if (g_hash_table_lookup_extended (imap_store->subscribed_folders, + folder_name, &key, &value)) { + g_hash_table_remove (imap_store->subscribed_folders, key); + g_free (key); + } name = strrchr (folder_name, imap_store->dir_sep); if (name) |