Skip to content
Permalink
Browse files

Added handling of NULL as input for SDL_GameControllerMapping().

For consistency with the similar functions getting SDL_GameController as input.
Also NULL is no SDL_GameController and therefore can not have a mapping anyway.
  • Loading branch information
philippwiesemann committed Oct 26, 2014
1 parent 90387da commit 30d6cec1bbe0255ea4dbc2e943615e445f313a30
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/joystick/SDL_gamecontroller.c
@@ -746,6 +746,10 @@ SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid)
char *
SDL_GameControllerMapping(SDL_GameController * gamecontroller)
{
if (!gamecontroller) {
return NULL;
}

return SDL_GameControllerMappingForGUID(gamecontroller->mapping.guid);
}

0 comments on commit 30d6cec

Please sign in to comment.