mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-10 16:45:35 +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:
parent
90387dafb4
commit
30d6cec1bb
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue