From d861820465b3ae77fa37fb3605ca73100320d1ff Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 26 Nov 2021 07:57:19 -0800 Subject: [PATCH] SDL_JoystickGetAttached() doesn't need to be noisy for NULL joystick Fixes https://github.com/libsdl-org/SDL/issues/5008 --- src/joystick/SDL_joystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }