aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-09-29 15:38:31 -0500
committerTed Gould <ted@gould.cx>2011-09-29 15:38:31 -0500
commit521526d79aa03ceee72ae15f4d29c2173a95aa83 (patch)
tree551312e2628d0b5da063602c3e58d867a9f180bb /src/utils.c
parentd6dcd6734c7316d8ff59e3f8f8f6037466fce354 (diff)
parent4e2dc05c209906b1a0d01b1c9f12c26a8ce2cd6d (diff)
downloadayatana-indicator-datetime-521526d79aa03ceee72ae15f4d29c2173a95aa83.tar.gz
ayatana-indicator-datetime-521526d79aa03ceee72ae15f4d29c2173a95aa83.tar.bz2
ayatana-indicator-datetime-521526d79aa03ceee72ae15f4d29c2173a95aa83.zip
* New upstream release.
* Fix corrupt environment when LANGUAGE not set (LP: #861123) * Measure string size with GLib (LP: #730476) * Free ECals when they have errors (LP: #774071) * Fix untranslated string (LP: #853130)
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c
index 73c8ab2..e6de92a 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -161,7 +161,8 @@ T_(const char *msg)
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 @@ T_(const char *msg)
/* 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);