mirror of
https://github.com/encounter/SDL.git
synced 2025-12-10 22:17:59 +00:00
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.
This commit is contained in:
@@ -746,6 +746,10 @@ SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid)
|
|||||||
char *
|
char *
|
||||||
SDL_GameControllerMapping(SDL_GameController * gamecontroller)
|
SDL_GameControllerMapping(SDL_GameController * gamecontroller)
|
||||||
{
|
{
|
||||||
|
if (!gamecontroller) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return SDL_GameControllerMappingForGUID(gamecontroller->mapping.guid);
|
return SDL_GameControllerMappingForGUID(gamecontroller->mapping.guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user