From 200c84b6b2c7557d83ec9f22fa4e995e5fc08167 Mon Sep 17 00:00:00 2001 From: darkoff9 Date: Tue, 11 Apr 2017 00:41:47 +0300 Subject: [PATCH] Fix joystick crash when mapping is -1 --- main/input_default.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/main/input_default.cpp b/main/input_default.cpp index 94684c50d20..8f0b8464ebf 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::Element *el = map_db[joy.mapping].axis.find(p_axis);