[gimp] Bug 704510 - GIMP segfaults on OSX.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 704510 - GIMP segfaults on OSX.
- Date: Fri, 19 Jul 2013 02:54:39 +0000 (UTC)
commit aa67bec9f0e8f551bec9c070f22fe8006bc15929
Author: Jehan <jehan girinstud io>
Date: Fri Jul 19 11:39:50 2013 +0900
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.
app/widgets/gimplanguagestore-parser.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimplanguagestore-parser.c b/app/widgets/gimplanguagestore-parser.c
index 8c24fbc..c237666 100644
--- a/app/widgets/gimplanguagestore-parser.c
+++ b/app/widgets/gimplanguagestore-parser.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]