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:
sspitzer%netscape.com 2001-04-19 00:59:56 +00:00
Родитель faffa4dad0
Коммит d15e50fa60
1 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -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)