Bug 704510 - GIMP segfaults on OSX.

setenv() does not behave well on some systems, in particular OSX (and
probably some BSDs), when the set value is NULL. In this case, let's
unsetenv() the environment variable instead.
This commit is contained in:
Jehan 2013-07-19 11:39:50 +09:00
parent d682135d7a
commit aa67bec9f0
1 changed files with 4 additions and 1 deletions

View File

@ -211,7 +211,10 @@ gimp_language_store_self_l10n (GimpLanguageStore *store,
g_setenv ("LANGUAGE", temp_lang, TRUE);
setlocale (LC_ALL, "");
lang = dgettext ("iso_639", lang);
g_setenv ("LANGUAGE", current_lang, TRUE);
if (current_lang)
g_setenv ("LANGUAGE", current_lang, TRUE);
else
g_unsetenv("LANGUAGE");
setlocale (LC_ALL, "");
g_free (current_lang);