Index: Source/modules/geolocation/GeolocationController.cpp |
diff --git a/Source/modules/geolocation/GeolocationController.cpp b/Source/modules/geolocation/GeolocationController.cpp |
index 1956eec6345fe9529451a4a5ae5c6e66895f6776..7c80533571d6fa4718d5f0ab4e8bd281191344be 100644 |
--- a/Source/modules/geolocation/GeolocationController.cpp |
+++ b/Source/modules/geolocation/GeolocationController.cpp |
@@ -64,7 +64,7 @@ void GeolocationController::addObserver(Geolocation* observer, bool enableHighAc |
if (m_client) { |
if (enableHighAccuracy) |
m_client->setEnableHighAccuracy(true); |
- if (wasEmpty && page()->visibilityState() == PageVisibilityStateVisible) |
+ if (wasEmpty && page() && page()->visibilityState() == PageVisibilityStateVisible) |
m_client->startUpdating(); |
} |
} |
@@ -135,7 +135,7 @@ void GeolocationController::pageVisibilityChanged() |
if (m_observers.isEmpty() || !m_client) |
return; |
- if (page()->visibilityState() == PageVisibilityStateVisible) |
+ if (page() && page()->visibilityState() == PageVisibilityStateVisible) |
adamk
2013/10/23 15:34:38
I'd hope that page() couldn't be null here, since
|
m_client->startUpdating(); |
else |
m_client->stopUpdating(); |