소스 검색

Fix crash when enumerating Steam Controllers

Closes https://github.com/libsdl-org/SDL/pull/13746
Sam Lantinga 1 개월 전
부모
커밋
fe16c620d8
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/joystick/hidapi/SDL_hidapi_steam.c

+ 5 - 0
src/joystick/hidapi/SDL_hidapi_steam.c

@@ -1038,6 +1038,11 @@ static bool HIDAPI_DriverSteam_IsSupportedDevice(SDL_HIDAPI_Device *device, cons
         return false;
     }
 
+    if (!device) {
+        // Might be supported by this driver, enumerate and find out
+        return true;
+    }
+
     if (device->is_bluetooth) {
         return true;
     }