Browse Source

joystick: Remove redundant CHECK_JOYSTICK_MAGIC in SDL_GetJoystickName

Since commit 0dfdf1f3 "Fixed crash if joystick functions are passed a
NULL joystick", we've already done this check by the time we get to
this point.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 1 year ago
parent
commit
76defc5c82
1 changed files with 0 additions and 2 deletions
  1. 0 2
      src/joystick/SDL_joystick.c

+ 0 - 2
src/joystick/SDL_joystick.c

@@ -1547,8 +1547,6 @@ const char *SDL_GetJoystickName(SDL_Joystick *joystick)
         if (info) {
             retval = info->name;
         } else {
-            CHECK_JOYSTICK_MAGIC(joystick, NULL);
-
             retval = joystick->name;
         }
     }