From 250b9b067cf09498658d44770af48501b08e7e4f Mon Sep 17 00:00:00 2001 From: Thomas Moenicke Date: Thu, 16 Aug 2007 16:31:24 +0000 Subject: [PATCH] Merge ... SVN commit 700851 by moenicke: * fix for kolab issue 1882 (Crash after reply to a revoked mail): The storage needs to be open before remove is called, otherwise it will not unregister the corresponding serial numbers from the message dict, since its message list is empty, and the .ids file contents are not loaded. That can lead to lookups in the dict returning stale pointers to the folder later. svn path=/trunk/KDE/kdepim/; revision=700858 --- kmfolder.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kmfolder.cpp b/kmfolder.cpp index f861ceddd..25e5ee156 100644 --- a/kmfolder.cpp +++ b/kmfolder.cpp @@ -520,6 +520,12 @@ void KMFolder::markUnreadAsRead() void KMFolder::remove() { + /* The storage needs to be open before remove is called, otherwise + it will not unregister the corresponding serial numbers from + the message dict, since its message list is empty, and the .ids + file contents are not loaded. That can lead to lookups in the + dict returning stale pointers to the folder later. */ + mStorage->open(); mStorage->remove(); }