[evolution] Bug 666706 - MailFolderCache: Crash on visiting a renamed folder



commit 9a38889305241f6831feda75d175c34b1c743646
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Dec 22 23:59:30 2011 -0500

    Bug 666706 - MailFolderCache: Crash on visiting a renamed folder

 mail/mail-folder-cache.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index eb046c5..722016c 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]