mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-26 15:58:41 +00:00
Added NULL pointer check
(cherry picked from commit961488b0dc) (cherry picked from commite4fc07cad0)
This commit is contained in:
parent
9ad6a36b7b
commit
825ffaa168
1 changed files with 4 additions and 0 deletions
|
|
@ -161,6 +161,10 @@ const char *SDL_GetHint(const char *name)
|
|||
const char *env;
|
||||
SDL_Hint *hint;
|
||||
|
||||
if (!name) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
env = SDL_getenv(name);
|
||||
for (hint = SDL_hints; hint; hint = hint->next) {
|
||||
if (SDL_strcmp(name, hint->name) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue