diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 95f241bc4..e94a8aa3e 100644 --- a/src/joystick/SDL_joystick.c +++ b/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; }