зеркало из https://github.com/mozilla/pjs.git
fix 45146 edit message as new crashing r=mscott
This commit is contained in:
Родитель
c155a4c8e0
Коммит
862df47812
|
@ -124,13 +124,13 @@ bridge_new_new_uri(void *bridgeStream, nsIURI *aURI)
|
||||||
nsXPIDLString uniCharset;
|
nsXPIDLString uniCharset;
|
||||||
i18nUrl->GetFolderCharset(getter_Copies(uniCharset));
|
i18nUrl->GetFolderCharset(getter_Copies(uniCharset));
|
||||||
nsAutoString charset(uniCharset);
|
nsAutoString charset(uniCharset);
|
||||||
if (!charset.IsEmpty())
|
if (!charset.IsEmpty() && msd->options)
|
||||||
msd->options->default_charset = charset.ToNewCString();
|
msd->options->default_charset = charset.ToNewCString();
|
||||||
|
|
||||||
// check to see if we have a charset override...and if we do, set that field appropriately too...
|
// check to see if we have a charset override...and if we do, set that field appropriately too...
|
||||||
nsresult rv = i18nUrl->GetCharsetOverRide(getter_Copies(uniCharset));
|
nsresult rv = i18nUrl->GetCharsetOverRide(getter_Copies(uniCharset));
|
||||||
charset = uniCharset;
|
charset = uniCharset;
|
||||||
if (NS_SUCCEEDED(rv) && !charset.IsEmpty())
|
if (NS_SUCCEEDED(rv) && !charset.IsEmpty() && msd->options)
|
||||||
msd->options->override_charset = charset.ToNewCString();
|
msd->options->override_charset = charset.ToNewCString();
|
||||||
|
|
||||||
// if the pref says always override and no manual override then set the folder charset to override
|
// if the pref says always override and no manual override then set the folder charset to override
|
||||||
|
@ -145,7 +145,7 @@ bridge_new_new_uri(void *bridgeStream, nsIURI *aURI)
|
||||||
{
|
{
|
||||||
i18nUrl->GetFolderCharset(getter_Copies(uniCharset));
|
i18nUrl->GetFolderCharset(getter_Copies(uniCharset));
|
||||||
charset.Assign(uniCharset);
|
charset.Assign(uniCharset);
|
||||||
if (!charset.IsEmpty())
|
if (!charset.IsEmpty() && msd->options)
|
||||||
msd->options->override_charset = charset.ToNewCString();
|
msd->options->override_charset = charset.ToNewCString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче