зеркало из 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
|
@ -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,6 +1728,7 @@ NS_IMETHODIMP nsImapMailFolder::GetNewMessages(nsIMsgWindow *aWindow)
|
|||
getter_AddRefs(eventQ));
|
||||
inbox->SetGettingNewMessages(PR_TRUE);
|
||||
rv = imapService->SelectFolder(eventQ, inbox, this, aWindow, nsnull);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -2115,6 +2115,7 @@ 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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче