Fix joystick crash when mapping is -1

This commit is contained in:
darkoff9 2017-04-11 00:41:47 +03:00 committed by Rémi Verschelde
parent 2ac0cf568d
commit 200c84b6b2

View file

@ -912,6 +912,7 @@ void InputDefault::joy_axis(int p_device, int p_axis, const JoyAxis &p_value) {
if (joy.mapping == -1) {
_axis_event(p_device, p_axis, val);
return;
};
Map<int, JoyEvent>::Element *el = map_db[joy.mapping].axis.find(p_axis);