Added a defensive check against XINPUTGETCAPABILITIES being NULL

This should never happen, but it does, possibly due to a data segment overwrite elsewhere.
This commit is contained in:
Sam Lantinga 2024-09-04 16:29:22 -07:00
parent ff1e252413
commit 20d0a1a3d1
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ void SDL_XINPUT_JoystickDetect(JoyStick_DeviceData **pContext)
{ {
int iuserid; int iuserid;
if (!s_bXInputEnabled) { if (!s_bXInputEnabled || !XINPUTGETCAPABILITIES) {
return; return;
} }