Skip to content

Commit

Permalink
joystick: Remove redundant CHECK_JOYSTICK_MAGIC in SDL_GetJoystickName
Browse files Browse the repository at this point in the history
Since commit 0dfdf1f "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 <[email protected]>
  • Loading branch information
smcv committed Mar 9, 2024
1 parent b6c5ad0 commit acf554d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/joystick/SDL_joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit acf554d

Please sign in to comment.