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>
This commit is contained in:
Simon McVittie 2024-03-09 11:11:36 +00:00 committed by Sam Lantinga
parent 41baf23e44
commit 76defc5c82
1 changed files with 0 additions and 2 deletions

View File

@ -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;
}
}