mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Added handling of NULL as input for SDL_GameControllerAddMapping().
This commit is contained in:
parent
33a2b58ca4
commit
7268eabb9b
@ -669,6 +669,10 @@ SDL_GameControllerAddMapping(const char *mappingString)
|
||||
ControllerMapping_t *pControllerMapping;
|
||||
SDL_bool is_xinput_mapping = SDL_FALSE;
|
||||
|
||||
if (!mappingString) {
|
||||
return SDL_InvalidParamError("mappingString");
|
||||
}
|
||||
|
||||
pchGUID = SDL_PrivateGetControllerGUIDFromMappingString(mappingString);
|
||||
if (!pchGUID) {
|
||||
return SDL_SetError("Couldn't parse GUID from %s", mappingString);
|
||||
|
Loading…
Reference in New Issue
Block a user