mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-23 13:09:11 +00:00
Check return value of VIRTUAL_HWDataForIndex()
This commit is contained in:
parent
a4604cb0d6
commit
bf8c9d2d70
1 changed files with 1 additions and 1 deletions
|
@ -585,7 +585,7 @@ static SDL_bool VIRTUAL_JoystickGetGamepadMapping(int device_index, SDL_GamepadM
|
|||
Uint8 current_button = 0;
|
||||
Uint8 current_axis = 0;
|
||||
|
||||
if (hwdata->desc.type != SDL_JOYSTICK_TYPE_GAMEPAD) {
|
||||
if (!hwdata || hwdata->desc.type != SDL_JOYSTICK_TYPE_GAMEPAD) {
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue