[gnome-control-center] datetime: don't try to set the timezone if the current location is unknown
- From: Thomas Wood <thos src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] datetime: don't try to set the timezone if the current location is unknown
- Date: Tue, 29 Jun 2010 18:17:18 +0000 (UTC)
commit 4915df9724539e9981aa85bbb5c6b33b07bfef32
Author: Thomas Wood <thomas wood intel com>
Date: Tue Jun 29 19:16:25 2010 +0100
datetime: don't try to set the timezone if the current location is unknown
panels/datetime/cc-datetime-panel.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index 70a864e..450782b 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -191,9 +191,13 @@ apply_button_clicked_cb (GtkButton *button,
set_system_time_async (unixtime, (GFunc) set_time_cb, self, NULL);
- filename = g_build_filename (SYSTEM_ZONEINFODIR, priv->current_location->zone,
- NULL);
- set_system_timezone_async (filename, (GFunc) set_timezone_cb, self, NULL);
+ if (priv->current_location)
+ {
+ filename = g_build_filename (SYSTEM_ZONEINFODIR,
+ priv->current_location->zone,
+ NULL);
+ set_system_timezone_async (filename, (GFunc) set_timezone_cb, self, NULL);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]