summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Geolocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/page/Geolocation.cpp')
-rw-r--r--WebCore/page/Geolocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index bc73bb5..ef3d43c 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -52,6 +52,9 @@ static const char permissionDeniedErrorMessage[] = "User denied Geolocation";
static PassRefPtr<Geoposition> createGeoposition(GeolocationPosition* position)
{
+ if (!position)
+ return 0;
+
RefPtr<Coordinates> coordinates = Coordinates::create(position->latitude(), position->longitude(), position->canProvideAltitude(), position->altitude(),
position->accuracy(), position->canProvideAltitudeAccuracy(), position->altitudeAccuracy(),
position->canProvideHeading(), position->heading(), position->canProvideSpeed(), position->speed());