[Bug 503750] Crash when parameters of navigator.geolocation.getCurrentPosition are null. r/sr=jst

This commit is contained in:
Doug Turner 2009-07-16 10:03:49 -07:00
parent 0f02b17cc3
commit a4523b236a

View File

@ -806,6 +806,8 @@ nsGeolocation::GetCurrentPosition(nsIDOMGeoPositionCallback *callback,
nsIDOMGeoPositionErrorCallback *errorCallback,
nsIDOMGeoPositionOptions *options)
{
NS_ENSURE_ARG_POINTER(callback);
if (sGeoEnabled == PR_FALSE)
return NS_ERROR_NOT_AVAILABLE;
@ -836,6 +838,8 @@ nsGeolocation::WatchPosition(nsIDOMGeoPositionCallback *aCallback,
nsIDOMGeoPositionOptions *aOptions,
PRInt32 *_retval NS_OUTPARAM)
{
NS_ENSURE_ARG_POINTER(aCallback);
if (sGeoEnabled == PR_FALSE)
return NS_ERROR_NOT_AVAILABLE;