android: EmulationActivity: Fix a crash when controller is disconnected.
This commit is contained in:
parent
c86611d950
commit
4ac39ef508
@ -432,6 +432,12 @@ public final class EmulationActivity extends AppCompatActivity {
|
||||
return false;
|
||||
}
|
||||
InputDevice input = event.getDevice();
|
||||
|
||||
if (input == null) {
|
||||
// Controller was disconnected
|
||||
return false;
|
||||
}
|
||||
|
||||
return NativeLibrary.onGamePadEvent(input.getDescriptor(), button, action);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user