mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-09 20:41:19 +00:00
Merge pull request #8805 from niacat/getenv-fix
platform_unix: Check whether LANG is defined before using it.
This commit is contained in:
commit
5f5a3fa6a2
@ -2537,7 +2537,10 @@ enum retro_language frontend_unix_get_user_language(void)
|
||||
}
|
||||
}
|
||||
#else
|
||||
lang = rarch_get_language_from_iso(getenv("LANG"));
|
||||
char *envvar = getenv("LANG");
|
||||
|
||||
if (envvar != NULL)
|
||||
lang = rarch_get_language_from_iso(envvar);
|
||||
#endif
|
||||
#endif
|
||||
return lang;
|
||||
|
Loading…
Reference in New Issue
Block a user