Skip to content

Commit

Permalink
Prevent crash when only one controller has moved (#3010)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin committed Mar 20, 2020
1 parent b484284 commit 1915c2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static void dispatch(Widget aWidget, int aDevice, boolean aFocused, boole
device.mHoverStartWidget = null;
}
for (int i=0; i<devices.size(); i++) {
if (devices.get(i) != device && devices.get(i).mHoverStartWidget != null) {
if (devices.get(i) != null && devices.get(i) != device && devices.get(i).mHoverStartWidget != null) {
generateEvent(devices.get(i).mHoverStartWidget, devices.get(i), aFocused, MotionEvent.ACTION_HOVER_EXIT, true);
}
}
Expand Down

0 comments on commit 1915c2d

Please sign in to comment.