Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java

Issue 644783003: [Android] Properly validate potentially null InputDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java b/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java
index 272b97edb34f23ffe19abfc8a4c2497a957c57bb..b97d1c326ec650ec0cf0e2af90d25477633a925b 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/GamepadList.java
@@ -247,6 +247,7 @@ public class GamepadList {
}
private static boolean isGamepadDevice(InputDevice inputDevice) {
+ if (inputDevice == null) return false;
return ((inputDevice.getSources() & InputDevice.SOURCE_JOYSTICK) ==
InputDevice.SOURCE_JOYSTICK);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698