зеркало из https://github.com/mozilla/gecko-dev.git
fix for #76200. crash when viewing a message with an <img> tag but no src.
r/sr=valeski,mscott. a=blizzard
This commit is contained in:
Родитель
faffa4dad0
Коммит
d15e50fa60
|
@ -482,7 +482,22 @@ NS_IMETHODIMP nsMsgMailNewsUrl::Equals(nsIURI *other, PRBool *_retval)
|
|||
|
||||
NS_IMETHODIMP nsMsgMailNewsUrl::SchemeIs(const char *aScheme, PRBool *_retval)
|
||||
{
|
||||
nsXPIDLCString scheme;
|
||||
nsresult rv = m_baseURL->GetScheme(getter_Copies(scheme));
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
// fix #76200 crash on email with <img> with no src.
|
||||
//
|
||||
// make sure we have a scheme before calling SchemeIs()
|
||||
// we have to do this because url parsing can result in a null mScheme
|
||||
// this extra string copy should be removed when #73845 is fixed.
|
||||
if (scheme.get()) {
|
||||
return m_baseURL->SchemeIs(aScheme, _retval);
|
||||
}
|
||||
else {
|
||||
*_retval = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgMailNewsUrl::Clone(nsIURI **_retval)
|
||||
|
|
Загрузка…
Ссылка в новой задаче