Crash in com.apple.WebCore: WebCore::NavigatorGamepad::gamepadFromPlatformGamepad.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Sep 2016 18:18:05 +0000 (18:18 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Sep 2016 18:18:05 +0000 (18:18 +0000)
<rdar://problem/28018073> and https://bugs.webkit.org/show_bug.cgi?id=161694

Reviewed by Alex Christensen.

No new tests (Caught by existing tests in some configurations).

* Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::platformGamepadInputActivity): Null check.

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

Source/WebCore/ChangeLog
Source/WebCore/Modules/gamepad/GamepadManager.cpp

index c723144..0cc2b07 100644 (file)
@@ -1,3 +1,15 @@
+2016-09-12  Brady Eidson  <beidson@apple.com>
+
+        Crash in com.apple.WebCore: WebCore::NavigatorGamepad::gamepadFromPlatformGamepad.
+        <rdar://problem/28018073> and https://bugs.webkit.org/show_bug.cgi?id=161694
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Caught by existing tests in some configurations).
+
+        * Modules/gamepad/GamepadManager.cpp:
+        (WebCore::GamepadManager::platformGamepadInputActivity): Null check.
+
 2016-09-12  Alex Christensen  <achristensen@webkit.org>
 
         Fix more URLParser quirks
index 9b9d7a9..1c34d3d 100644 (file)
@@ -120,8 +120,10 @@ void GamepadManager::platformGamepadInputActivity()
     if (m_gamepadBlindNavigators.isEmpty() && m_gamepadBlindDOMWindows.isEmpty())
         return;
 
-    for (auto* gamepad : GamepadProvider::singleton().platformGamepads())
-        makeGamepadVisible(*gamepad, m_gamepadBlindNavigators, m_gamepadBlindDOMWindows);
+    for (auto* gamepad : GamepadProvider::singleton().platformGamepads()) {
+        if (gamepad)
+            makeGamepadVisible(*gamepad, m_gamepadBlindNavigators, m_gamepadBlindDOMWindows);
+    }
 
     m_gamepadBlindNavigators.clear();
     m_gamepadBlindDOMWindows.clear();