fix crash on exit if hidden pref to confirm folder deletion on empty imap trash is set, and there are sub-folders of the trash, sr=mscott, a=chofmann 239473

This commit is contained in:
bienvenu%nventure.com 2004-04-03 23:46:08 +00:00
Родитель c29de605ca
Коммит a5d65afbfd
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -1284,8 +1284,11 @@ NS_IMETHODIMP nsImapMailFolder::EmptyTrash(nsIMsgWindow *aMsgWindow,
IMAPGetStringByID(IMAP_EMPTY_TRASH_CONFIRM, getter_Copies(confirmationStr));
promptService = do_GetService("@mozilla.org/embedcomp/prompt-service;1");
nsCOMPtr<nsIDocShell> docShell;
(void) aMsgWindow->GetRootDocShell(getter_AddRefs(docShell));
parentWindow = do_QueryInterface(docShell);
if (aMsgWindow)
{
(void) aMsgWindow->GetRootDocShell(getter_AddRefs(docShell));
parentWindow = do_QueryInterface(docShell);
}
rv = IMAPGetStringBundle(getter_AddRefs(bundle));
NS_ENSURE_SUCCESS(rv, rv);
rv = aEnumerator->First();