diff options
author | Ted Gould <ted@gould.cx> | 2011-09-29 15:36:39 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-09-29 15:36:39 -0500 |
commit | 4e2dc05c209906b1a0d01b1c9f12c26a8ce2cd6d (patch) | |
tree | a20803b6ae442a06f1227bcf067cdf7ccb10b8e4 /src/utils.c | |
parent | 1e2f73f716198aec43b76570e1926d73ddfeca19 (diff) | |
parent | c2fbaa0add265eab4a5c493d97fa80efc75a526a (diff) | |
download | ayatana-indicator-datetime-4e2dc05c209906b1a0d01b1c9f12c26a8ce2cd6d.tar.gz ayatana-indicator-datetime-4e2dc05c209906b1a0d01b1c9f12c26a8ce2cd6d.tar.bz2 ayatana-indicator-datetime-4e2dc05c209906b1a0d01b1c9f12c26a8ce2cd6d.zip |
Import upstream version 0.3.0
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 6 |
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); |