fix shutdown crash after opening cross-folder virtual folder, 262492 sr=mscott

This commit is contained in:
bienvenu%nventure.com 2004-10-01 19:59:37 +00:00
parent 0a8dbdccb4
commit 789efce8a2
2 changed files with 10 additions and 0 deletions

View File

@ -83,6 +83,8 @@ NS_IMETHODIMP nsMsgSearchDBView::Close()
for(PRInt32 i = 0; i < count; i++)
m_dbToUseList[i]->RemoveListener(this);
m_dbToUseList.Clear();
return NS_OK;
}
@ -222,6 +224,12 @@ nsMsgSearchDBView::OnNewSearch()
return NS_OK;
}
NS_IMETHODIMP nsMsgSearchDBView::OnAnnouncerGoingAway(nsIDBChangeAnnouncer *instigator)
{
m_dbToUseList.RemoveObject(NS_STATIC_CAST(nsIMsgDatabase *, instigator));
return nsMsgDBView::OnAnnouncerGoingAway(instigator);
}
nsresult nsMsgSearchDBView::GetFolders(nsISupportsArray **aFolders)
{
NS_ENSURE_ARG_POINTER(aFolders);

View File

@ -67,6 +67,8 @@ public:
virtual nsresult OnNewHeader(nsIMsgDBHdr *newHdr, nsMsgKey parentKey, PRBool ensureListed);
NS_IMETHOD GetFolderForViewIndex(nsMsgViewIndex index, nsIMsgFolder **folder);
NS_IMETHOD OnAnnouncerGoingAway(nsIDBChangeAnnouncer *instigator);
virtual nsresult GetFolders(nsISupportsArray **aFolders);
virtual nsresult GetFolderFromMsgURI(const char *aMsgURI, nsIMsgFolder **aFolder);