From 02a8604906b1f50000f96e2f8dbd0d50a162ab6f Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Sun, 28 Aug 2016 17:14:21 +0200 Subject: [PATCH] Fix crash when trying to access the guid of an unavailable Gamepad. Throws an error now. --- main/input_default.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/main/input_default.cpp b/main/input_default.cpp index c655b409ffb..f93a142c54a 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -1055,6 +1055,7 @@ bool InputDefault::is_joy_mapped(int p_device) { } String InputDefault::get_joy_guid_remapped(int p_device) const { + ERR_FAIL_COND_V(!joy_names.has(p_device), ""); return joy_names[p_device].uid; }