Fix for 58748. r=jefft sr=mscott. Don't crash if there's no trash folder while trying to delete a folder.

This commit is contained in:
putterman%netscape.com 2000-11-05 00:16:03 +00:00
Родитель 993cd60daf
Коммит f023865395
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -1687,6 +1687,11 @@ nsImapMailFolder::DeleteSubFolders(nsISupportsArray* folders, nsIMsgWindow *msgW
if (!msgWindow) return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIDocShell> docShell;
msgWindow->GetRootDocShell(getter_AddRefs(docShell));
//If we can't find the trash folder and we are supposed to move it to the trash
//return failure.
if((NS_FAILED(rv) || !trashFolder) && !deleteNoTrash)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIPrompt> dialog;
if (docShell) dialog = do_GetInterface(docShell);
if (!deleteNoTrash)