ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #03972
[Merge] lp:~robert-ancell/indicator-datetime/lp-861123 into lp:indicator-datetime
Robert Ancell has proposed merging lp:~robert-ancell/indicator-datetime/lp-861123 into lp:indicator-datetime.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
Related bugs:
Bug #861123 in Indicator Date and Time: "Can call setenv ("LANGUAGE", NULL) which corrupts the environment"
https://bugs.launchpad.net/indicator-datetime/+bug/861123
For more details, see:
https://code.launchpad.net/~robert-ancell/indicator-datetime/lp-861123/+merge/77275
--
https://code.launchpad.net/~robert-ancell/indicator-datetime/lp-861123/+merge/77275
Your team ayatana-commits is subscribed to branch lp:indicator-datetime.
=== modified file 'src/utils.c'
--- src/utils.c 2011-06-28 14:32:04 +0000
+++ src/utils.c 2011-09-28 05:03:23 +0000
@@ -161,7 +161,8 @@
char *time_locale = g_strdup(setlocale(LC_TIME, NULL));
char *language = g_strdup(g_getenv("LANGUAGE"));
char *rv;
- g_unsetenv("LANGUAGE");
+ if (language)
+ g_unsetenv("LANGUAGE");
setlocale(LC_MESSAGES, time_locale);
/* Get the LC_TIME version */
@@ -169,7 +170,8 @@
/* Put everything back the way it was */
setlocale(LC_MESSAGES, message_locale);
- g_setenv("LANGUAGE", language, TRUE);
+ if (language)
+ g_setenv("LANGUAGE", language, TRUE);
g_free(message_locale);
g_free(time_locale);
g_free(language);
Follow ups