Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 1915c2d

Browse files
authored
Prevent crash when only one controller has moved (#3010)
1 parent b484284 commit 1915c2d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/common/shared/org/mozilla/vrbrowser/input/MotionEventGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public static void dispatch(Widget aWidget, int aDevice, boolean aFocused, boole
130130
device.mHoverStartWidget = null;
131131
}
132132
for (int i=0; i<devices.size(); i++) {
133-
if (devices.get(i) != device && devices.get(i).mHoverStartWidget != null) {
133+
if (devices.get(i) != null && devices.get(i) != device && devices.get(i).mHoverStartWidget != null) {
134134
generateEvent(devices.get(i).mHoverStartWidget, devices.get(i), aFocused, MotionEvent.ACTION_HOVER_EXIT, true);
135135
}
136136
}

0 commit comments

Comments
 (0)