diff options
author | darkoff9 <darkoff09@gmail.com> | 2017-04-11 00:41:47 +0300 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-04-10 23:41:47 +0200 |
commit | 200c84b6b2c7557d83ec9f22fa4e995e5fc08167 (patch) | |
tree | 1ba8242b7d4e0e23aa3e9e35ccdc20add6bea4b9 | |
parent | 2ac0cf568d8ecc04dfdb772330b26831f64bdfb9 (diff) |
Fix joystick crash when mapping is -1
-rw-r--r-- | main/input_default.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp index 94684c50d2..8f0b8464eb 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -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); |