[CRASH] bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEv...
authorapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 10:29:57 +0000 (10:29 +0000)
committerapavlov@chromium.org <apavlov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 10:29:57 +0000 (10:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77953

Reviewed by Andreas Kling.

* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106916 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/EventHandler.cpp

index 06db2f4..6df97c2 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-07  Alexander Pavlov  <apavlov@chromium.org>
+
+        [CRASH] bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent& event) references a NULL pointer
+        https://bugs.webkit.org/show_bug.cgi?id=77953
+
+        Reviewed by Andreas Kling.
+
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
+
 2012-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r106912.
index 1658831..088b05c 100644 (file)
@@ -3456,7 +3456,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
 
 bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent& event)
 {
-    if (!m_frame->document()->settings()->isTouchEventEmulationEnabled())
+    if (!m_frame || !m_frame->settings() || !m_frame->settings()->isTouchEventEmulationEnabled())
         return false;
 
     PlatformEvent::Type eventType = event.type();