diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-10-31 19:19:47 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-10-31 19:19:47 +0000 |
commit | dec0ff403debe03f924ca03592b68c8760bce898 (patch) | |
tree | c0f9e860236199c10c6629e0a83b7e68cfa03152 | |
parent | 0439dc69bfd71c42d01b7d11cb586ef056503b28 (diff) | |
parent | 28d4e4fb2ae57856acc306ae056090546cc49afb (diff) | |
download | ayatana-indicator-datetime-dec0ff403debe03f924ca03592b68c8760bce898.tar.gz ayatana-indicator-datetime-dec0ff403debe03f924ca03592b68c8760bce898.tar.bz2 ayatana-indicator-datetime-dec0ff403debe03f924ca03592b68c8760bce898.zip |
Don't generate g_critical() messages in the log when the timezone object is clearing its value.
. Fixes: https://bugs.launchpad.net/bugs/1246532.
Approved by Ted Gould, PS Jenkins bot.
-rw-r--r-- | src/timezone.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/timezone.c b/src/timezone.c index ca207f2..4f8addc 100644 --- a/src/timezone.c +++ b/src/timezone.c @@ -124,8 +124,11 @@ indicator_datetime_timezone_set_timezone (IndicatorDatetimeTimezone * self, if (g_strcmp0 (p->timezone->str, timezone)) { - g_string_assign (p->timezone, timezone); - g_debug ("%s new timezone set: '%s'", G_STRLOC, timezone); + if (timezone != NULL) + g_string_assign (p->timezone, timezone); + else + g_string_set_size (p->timezone, 0); + g_debug ("%s new timezone set: '%s'", G_STRLOC, p->timezone->str); g_object_notify_by_pspec (G_OBJECT(self), properties[PROP_TIMEZONE]); } } |