mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #1312 - Fix potential crashes in MailNews.
These are straightforward, one-line changes with no obvious dependencies. Probably could have been taken a long time ago. Ref: BZ 1638634, 1606091
This commit is contained in:
parent
10fdf0e1c5
commit
e3aa3c2963
2 changed files with 8 additions and 7 deletions
|
|
@ -233,6 +233,13 @@ NS_IMETHODIMP nsMessenger::SetWindow(mozIDOMWindowProxy *aWin, nsIMsgWindow *aMs
|
|||
do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Remove the folder listener if we added it, i.e. if mWindow is non-null
|
||||
if (mWindow)
|
||||
{
|
||||
rv = mailSession->RemoveFolderListener(this);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
if (aWin)
|
||||
{
|
||||
mMsgWindow = aMsgWindow;
|
||||
|
|
@ -271,13 +278,6 @@ NS_IMETHODIMP nsMessenger::SetWindow(mozIDOMWindowProxy *aWin, nsIMsgWindow *aMs
|
|||
} // if aWin
|
||||
else
|
||||
{
|
||||
// Remove the folder listener if we added it, i.e. if mWindow is non-null
|
||||
if (mWindow)
|
||||
{
|
||||
rv = mailSession->RemoveFolderListener(this);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
mWindow = nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1803,6 +1803,7 @@ nsImapMailFolder::GetImapIncomingServer(nsIImapIncomingServer **aImapIncomingSer
|
|||
if (NS_SUCCEEDED(GetServer(getter_AddRefs(server))) && server)
|
||||
{
|
||||
nsCOMPtr <nsIImapIncomingServer> incomingServer = do_QueryInterface(server);
|
||||
NS_ENSURE_TRUE(incomingServer, NS_ERROR_NO_INTERFACE);
|
||||
incomingServer.swap(*aImapIncomingServer);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue