From b9362877ccf9e5f8027f12898166d56518bbedb6 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 9 Mar 2010 21:24:23 +0000 Subject: When starting the Geolocation service, we need to make sure that we have a valid FrameView before querying the Java side to determine whether the WebView is paused. Bug: 2501254 Change-Id: Ideb86ce4c35efb7bc7595c4205dc1e8d5c1cf106 --- WebCore/page/Geolocation.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'WebCore/page') diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp index faa8f86..d021f7b 100644 --- a/WebCore/page/Geolocation.cpp +++ b/WebCore/page/Geolocation.cpp @@ -650,7 +650,12 @@ bool Geolocation::startUpdating(GeoNotifier* notifier) // TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 // Note that the correct fix is to use a 'paused' flag in WebCore, rather // than calling into PlatformBridge. - return m_service->startUpdating(notifier->m_options.get(), PlatformBridge::isWebViewPaused(m_frame->view())); + if (!m_frame) + return false; + FrameView* view = m_frame->view(); + if (!view) + return false; + return m_service->startUpdating(notifier->m_options.get(), PlatformBridge::isWebViewPaused(view)); #else return m_service->startUpdating(notifier->m_options.get()); #endif -- cgit v1.1