mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-17 20:05:33 +00:00
Fixed crash if SetMappingValue() is passed a NULL key
This commit is contained in:
@@ -2463,6 +2463,10 @@ static char *SetMappingValue(char *mapping, const char *key, const char *value)
|
|||||||
char **new_values = NULL;
|
char **new_values = NULL;
|
||||||
SDL_bool result = SDL_FALSE;
|
SDL_bool result = SDL_FALSE;
|
||||||
|
|
||||||
|
if (!key) {
|
||||||
|
return mapping;
|
||||||
|
}
|
||||||
|
|
||||||
SplitMapping(mapping, &parts);
|
SplitMapping(mapping, &parts);
|
||||||
i = FindMappingKey(&parts, key);
|
i = FindMappingKey(&parts, key);
|
||||||
if (i >= 0) {
|
if (i >= 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user