mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 19:38:14 +00:00
Added NULL pointer check
This commit is contained in:
@@ -163,6 +163,10 @@ const char *SDL_GetHint(const char *name)
|
|||||||
const char *env;
|
const char *env;
|
||||||
SDL_Hint *hint;
|
SDL_Hint *hint;
|
||||||
|
|
||||||
|
if (!name) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
env = SDL_getenv(name);
|
env = SDL_getenv(name);
|
||||||
for (hint = SDL_hints; hint; hint = hint->next) {
|
for (hint = SDL_hints; hint; hint = hint->next) {
|
||||||
if (SDL_strcmp(name, hint->name) == 0) {
|
if (SDL_strcmp(name, hint->name) == 0) {
|
||||||
|
Reference in New Issue
Block a user