Преглед изворни кода

SDL_JoystickGetAttached() doesn't need to be noisy for NULL joystick

Fixes https://github.com/libsdl-org/SDL/issues/5008
Sam Lantinga пре 4 година
родитељ
комит
d861820465
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/joystick/SDL_joystick.c

+ 1 - 1
src/joystick/SDL_joystick.c

@@ -759,7 +759,7 @@ SDL_JoystickGetButton(SDL_Joystick *joystick, int button)
 SDL_bool
 SDL_JoystickGetAttached(SDL_Joystick *joystick)
 {
-    if (!SDL_PrivateJoystickValid(joystick)) {
+    if (!joystick) {
         return SDL_FALSE;
     }