Fixed crash on Windows when a controller is connected
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled

This commit is contained in:
Sam Lantinga
2026-05-01 16:57:07 -07:00
parent e70f1bfc29
commit 4a52a5ee04
+1 -1
View File
@@ -376,7 +376,7 @@ static bool HIDAPI_DriverXboxOne_IsSupportedDevice(SDL_HIDAPI_Device *device, co
}
#endif
#ifdef SDL_PLATFORM_WIN32
if (SDL_strncmp(device->path, "\\\\?\\HID#", 8) == 0) {
if (device && SDL_strncmp(device->path, "\\\\?\\HID#", 8) == 0) {
// Windows provides a fake HID endpoint for XGIP controllers, don't use this
return false;
}