Added handling of NULL as input for SDL_GameControllerAddMapping().
This commit is contained in:
parent
bbbe3edca1
commit
76173b195e
1 changed files with 4 additions and 0 deletions
|
@ -669,6 +669,10 @@ SDL_GameControllerAddMapping(const char *mappingString)
|
||||||
ControllerMapping_t *pControllerMapping;
|
ControllerMapping_t *pControllerMapping;
|
||||||
SDL_bool is_xinput_mapping = SDL_FALSE;
|
SDL_bool is_xinput_mapping = SDL_FALSE;
|
||||||
|
|
||||||
|
if (!mappingString) {
|
||||||
|
return SDL_InvalidParamError("mappingString");
|
||||||
|
}
|
||||||
|
|
||||||
pchGUID = SDL_PrivateGetControllerGUIDFromMappingString(mappingString);
|
pchGUID = SDL_PrivateGetControllerGUIDFromMappingString(mappingString);
|
||||||
if (!pchGUID) {
|
if (!pchGUID) {
|
||||||
return SDL_SetError("Couldn't parse GUID from %s", mappingString);
|
return SDL_SetError("Couldn't parse GUID from %s", mappingString);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue