Bug 477848 - FF 3.1b2 crashes when executing some JS code [@ nsGeolocation::nsGeolocation(nsIDOMWindow*) ]. r/sr=jst

This commit is contained in:
Doug Turner 2009-02-10 17:24:15 -08:00
parent a315c70816
commit c12ec02cab

View File

@ -9500,7 +9500,7 @@ NS_IMETHODIMP nsNavigator::GetGeolocation(nsIDOMGeoGeolocation **_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
if (!mGeolocation) {
if (!mGeolocation && mDocShell) {
nsCOMPtr<nsIDOMWindow> contentDOMWindow(do_GetInterface(mDocShell));
mGeolocation = new nsGeolocation(contentDOMWindow);
}