From 4b58cdfac8a331d0bb05e1690903b21cca32b4ae Mon Sep 17 00:00:00 2001 From: "flamingice%sourmilk.net" Date: Thu, 17 Aug 2006 04:27:44 +0000 Subject: [PATCH] Bug 339518: Switching IMAP folders while "mark-as-spam" is running causes a crash [@ nsMsgDBView::DeleteMessages], patch by Adam Guthrie , r+sr=bienvenu, a=dveditz git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_0_BRANCH@207693 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/base/src/nsMsgDBView.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozilla/mailnews/base/src/nsMsgDBView.cpp b/mozilla/mailnews/base/src/nsMsgDBView.cpp index 2dbecd73888..c2c8c26570a 100644 --- a/mozilla/mailnews/base/src/nsMsgDBView.cpp +++ b/mozilla/mailnews/base/src/nsMsgDBView.cpp @@ -1864,6 +1864,11 @@ NS_IMETHODIMP nsMsgDBView::Close() m_flags.RemoveAll(); m_levels.RemoveAll(); + // clear these out since they no longer apply if we're switching a folder + nsMemory::Free(mJunkIndices); + mJunkIndices = nsnull; + mNumJunkIndices = 0; + // this needs to happen after we remove all the keys, since RowCountChanged() will call our GetRowCount() if (mTree) mTree->RowCountChanged(0, -oldSize);