mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-30 10:12:59 +00:00
fix for crasher bug #176056. crash when setting up default smtp servers. r/sr=bienvenu, a=asa.
This commit is contained in:
parent
13e08312cf
commit
5cb1e71d04
@ -116,7 +116,11 @@ function onOk()
|
||||
function onCancel()
|
||||
{
|
||||
window.arguments[0].result = false;
|
||||
smtpService.defaultServer = gOldDefaultSmtpServer;
|
||||
|
||||
// there might not be an old one. see bug #176056
|
||||
if (gOldDefaultSmtpServer)
|
||||
smtpService.defaultServer = gOldDefaultSmtpServer;
|
||||
|
||||
window.opener.onExitAdvancedDialog(gAddedSmtpServers,false);
|
||||
return true;
|
||||
}
|
||||
|
@ -906,12 +906,13 @@ nsSmtpService::GetDefaultServer(nsISmtpServer **aServer)
|
||||
NS_IMETHODIMP
|
||||
nsSmtpService::SetDefaultServer(nsISmtpServer *aServer)
|
||||
{
|
||||
nsresult rv;
|
||||
NS_ENSURE_ARG_POINTER(aServer);
|
||||
|
||||
mDefaultSmtpServer = aServer;
|
||||
|
||||
nsXPIDLCString serverKey;
|
||||
rv = aServer->GetKey(getter_Copies(serverKey));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsresult rv = aServer->GetKey(getter_Copies(serverKey));
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
nsCOMPtr<nsIPref> pref(do_GetService(NS_PREF_CONTRACTID, &rv));
|
||||
pref->SetCharPref("mail.smtp.defaultserver", serverKey);
|
||||
|
Loading…
x
Reference in New Issue
Block a user