Fix crash when trying to access the guid of an unavailable Gamepad.

Throws an error now.
This commit is contained in:
Andreas Haas 2016-08-28 17:14:21 +02:00
parent 6c674375e5
commit 02a8604906
No known key found for this signature in database
GPG Key ID: B5FFAE1B65FBD2E1
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}