Fix crash in ~WebProcessPool when using Geolocation with useNetworkProcess=true
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebGeolocationManagerProxy.cpp
index d77e90e..740be46 100644 (file)
@@ -57,8 +57,12 @@ void WebGeolocationManagerProxy::initializeProvider(const WKGeolocationProviderB
 
 void WebGeolocationManagerProxy::processPoolDestroyed()
 {
+    bool wasUpdating = isUpdating();
     m_updateRequesters.clear();
-    m_provider.stopUpdating(this);
+
+    ASSERT(!isUpdating());
+    if (wasUpdating)
+        m_provider.stopUpdating(this);
 }
 
 void WebGeolocationManagerProxy::processDidClose(WebProcessProxy* webProcessProxy)