Fix joystick crash when mapping is -1
This commit is contained in:
parent
2ac0cf568d
commit
200c84b6b2
1 changed files with 1 additions and 0 deletions
|
@ -912,6 +912,7 @@ void InputDefault::joy_axis(int p_device, int p_axis, const JoyAxis &p_value) {
|
||||||
|
|
||||||
if (joy.mapping == -1) {
|
if (joy.mapping == -1) {
|
||||||
_axis_event(p_device, p_axis, val);
|
_axis_event(p_device, p_axis, val);
|
||||||
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
Map<int, JoyEvent>::Element *el = map_db[joy.mapping].axis.find(p_axis);
|
Map<int, JoyEvent>::Element *el = map_db[joy.mapping].axis.find(p_axis);
|
||||||
|
|
Loading…
Reference in a new issue