aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/mail-folder-cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index eb046c5406..722016c51b 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -670,8 +670,10 @@ rename_folders (MailFolderCache *cache,
if (mfi) {
up->oldfull = mfi->full_name;
+ /* Be careful not to invoke the destroy function. */
+ g_hash_table_steal (si->folders, mfi->full_name);
+
/* Its a rename op */
- g_hash_table_remove (si->folders, mfi->full_name);
mfi->full_name = g_strdup (fi->full_name);
mfi->flags = fi->flags;
mfi->has_children = fi->child != NULL;