[gnome-initial-setup] timezone: Fix timezone page if geoclue isn't around



commit aa950f477689b4e537cb186334a5f91225509864
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Oct 30 15:16:16 2013 -0400

    timezone: Fix timezone page if geoclue isn't around

 .../pages/timezone/gis-timezone-page.c             |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnome-initial-setup/pages/timezone/gis-timezone-page.c 
b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
index 17ab221..ed28d73 100644
--- a/gnome-initial-setup/pages/timezone/gis-timezone-page.c
+++ b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
@@ -166,7 +166,7 @@ set_auto_location (GisTimezonePage  *page,
 static void
 get_location_from_geoclue (GisTimezonePage *page)
 {
-  GDBusProxy *manager, *client, *location;
+  GDBusProxy *manager = NULL, *client = NULL, *location = NULL;
   GVariant *value;
   const char *object_path;
   double latitude, longitude;
@@ -185,6 +185,9 @@ get_location_from_geoclue (GisTimezonePage *page)
   value = g_dbus_proxy_call_sync (manager, "GetClient", NULL,
                                   G_DBUS_CALL_FLAGS_NONE, -1,
                                   NULL, NULL);
+  if (!value)
+    goto out;
+
   g_variant_get_child (value, 0, "&o", &object_path);
 
   client = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]