Fix crash in xinput with verbose logging

This commit is contained in:
krzys-h 2019-01-18 17:50:13 +01:00
parent b70683fa08
commit d98962189a

View File

@ -181,6 +181,9 @@ const char *xinput_joypad_name(unsigned pad)
return XBOX_ONE_CONTROLLER_NAMES[xuser];
#endif
if (xuser < 0)
return NULL;
return XBOX_CONTROLLER_NAMES[xuser];
}