diff --git a/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumInputHandler.java b/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumInputHandler.java index dac95559c..1619f7662 100644 --- a/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumInputHandler.java +++ b/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumInputHandler.java @@ -186,6 +186,10 @@ public class PandemoniumInputHandler implements InputDeviceListener { final int pandemoniumJoyId = mJoystickIds.get(deviceId); Joystick joystick = mJoysticksDevices.get(deviceId); + if (joystick == null) { + return true; + } + for (int i = 0; i < joystick.axes.size(); i++) { final int axis = joystick.axes.get(i); final float value = event.getAxisValue(axis);