Bug 832232 - Protect against missing geolocation services during shutdown. r=dougt a=tef+
authorJosh Matthews <josh@joshmatthews.net>
Tue, 19 Feb 2013 23:53:51 -0500
changeset 118612 d22562565d969d01f500a98a947129d333303cd2
parent 118611 a866d4f1be4cdd4333ed6846c0be33dc283a3345
child 118613 dbc39e13c7e233b3dd1efc6562ee7a8c379762f5
push id498
push userryanvm@gmail.com
push dateTue, 26 Feb 2013 22:41:30 +0000
reviewersdougt, tef
bugs832232
milestone18.0
Bug 832232 - Protect against missing geolocation services during shutdown. r=dougt a=tef+
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2468,17 +2468,19 @@ ContentParent::RecvRemoveGeolocationList
   return true;
 }
 
 bool
 ContentParent::RecvSetGeolocationHigherAccuracy(const bool& aEnable)
 {
     nsRefPtr<nsGeolocationService> geoSvc =
         nsGeolocationService::GetGeolocationService();
-    geoSvc->SetHigherAccuracy(aEnable);
+    if (geoSvc) {
+        geoSvc->SetHigherAccuracy(aEnable);
+    }
     return true;
 }
 
 NS_IMETHODIMP
 ContentParent::HandleEvent(nsIDOMGeoPosition* postion)
 {
   unused << SendGeolocationUpdate(GeoPosition(postion));
   return NS_OK;