From 5ea4cebfa81bd89f042b3345e6a9de0f5294a9b2 Mon Sep 17 00:00:00 2001 From: "Randall E. Barker" Date: Tue, 17 Mar 2020 16:26:42 -0700 Subject: [PATCH] Only check device if it exists (#2975) Fixes a crash where if one of the controllers has not been used and is not part of the device table would cause a crash. --- .../org/mozilla/vrbrowser/input/MotionEventGenerator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java b/app/src/common/shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java index 3f1d64b62..553c9b0ec 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java @@ -155,7 +155,9 @@ private static boolean isOtherDeviceDown(int deviceId) { boolean result = false; for (int i=0; i