зеркало из https://github.com/mozilla/gecko-dev.git
fix crash get new mail with no inbox r=sspitzer 51366
This commit is contained in:
Родитель
7e6c98de52
Коммит
e527aaca93
|
@ -1708,9 +1708,9 @@ nsImapMailFolder::DeleteSubFolders(nsISupportsArray* folders, nsIMsgWindow *msgW
|
|||
|
||||
NS_IMETHODIMP nsImapMailFolder::GetNewMessages(nsIMsgWindow *aWindow)
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
NS_WITH_SERVICE(nsIImapService, imapService, kCImapService, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
NS_WITH_SERVICE(nsIImapService, imapService, kCImapService, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsCOMPtr<nsIMsgFolder> inbox;
|
||||
nsCOMPtr<nsIMsgFolder> rootFolder;
|
||||
rv = GetRootFolder(getter_AddRefs(rootFolder));
|
||||
|
@ -1719,6 +1719,8 @@ NS_IMETHODIMP nsImapMailFolder::GetNewMessages(nsIMsgWindow *aWindow)
|
|||
PRUint32 numFolders;
|
||||
rv = rootFolder->GetFoldersWithFlag(MSG_FOLDER_FLAG_INBOX, 1, &numFolders, getter_AddRefs(inbox));
|
||||
}
|
||||
if (inbox)
|
||||
{
|
||||
nsCOMPtr <nsIEventQueue> eventQ;
|
||||
NS_WITH_SERVICE(nsIEventQueueService, pEventQService, kEventQueueServiceCID, &rv);
|
||||
if (NS_SUCCEEDED(rv) && pEventQService)
|
||||
|
@ -1726,8 +1728,9 @@ NS_IMETHODIMP nsImapMailFolder::GetNewMessages(nsIMsgWindow *aWindow)
|
|||
getter_AddRefs(eventQ));
|
||||
inbox->SetGettingNewMessages(PR_TRUE);
|
||||
rv = imapService->SelectFolder(eventQ, inbox, this, aWindow, nsnull);
|
||||
}
|
||||
|
||||
return rv;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapMailFolder::Shutdown(PRBool shutdownChildren)
|
||||
|
|
|
@ -2115,8 +2115,9 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetNewMessages(nsIMsgWindow *aWindow)
|
|||
rv = rootFolder->GetFoldersWithFlag(MSG_FOLDER_FLAG_INBOX, 1, &numFolders, getter_AddRefs(inbox));
|
||||
}
|
||||
|
||||
if (inbox)
|
||||
rv = localMailServer->GetNewMail(aWindow, nsnull, inbox, nsnull);
|
||||
return rv;
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult nsMsgLocalMailFolder::WriteStartOfNewMessage()
|
||||
|
|
Загрузка…
Ссылка в новой задаче