Skip to content

Commit

Permalink
Fix crash in xinput with verbose logging
Browse files Browse the repository at this point in the history
  • Loading branch information
krzys-h committed Jan 18, 2019
1 parent b70683f commit d989621
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions input/drivers_joypad/xinput_joypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down

0 comments on commit d989621

Please sign in to comment.