mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
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:

committed by
Sam Lantinga

parent
41baf23e44
commit
76defc5c82
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user