Skip to content

Commit

Permalink
Only check device if it exists (#2975)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bluemarvin committed Mar 17, 2020
1 parent 6fd782c commit 5ea4ceb
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -155,7 +155,9 @@ private static boolean isOtherDeviceDown(int deviceId) {
boolean result = false;
for (int i=0; i<devices.size(); i++) {
if (i != deviceId) {
result |= devices.get(i).mTouchStartWidget != null;
if (devices.get(i) != null) {
result |= devices.get(i).mTouchStartWidget != null;
}
}
}

Expand Down

0 comments on commit 5ea4ceb

Please sign in to comment.