diff options
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-location-manager.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c index 2e45ab688..278af72f2 100644 --- a/libempathy-gtk/empathy-location-manager.c +++ b/libempathy-gtk/empathy-location-manager.c @@ -452,6 +452,9 @@ update_resources (EmpathyLocationManager *location_manager) DEBUG ("Updating resources %d", priv->resources); + if (!priv->geoclue_is_setup) + return; + /* As per Geoclue bug #15126, using NONE results in no address * being found as geoclue-manual report an empty address with * accuracy = NONE */ @@ -463,9 +466,6 @@ update_resources (EmpathyLocationManager *location_manager) return; } - if (!priv->geoclue_is_setup) - return; - geoclue_address_get_address_async (priv->gc_address, initial_address_cb, location_manager); geoclue_position_get_position_async (priv->gc_position, @@ -482,9 +482,16 @@ setup_geoclue (EmpathyLocationManager *location_manager) DEBUG ("Setting up Geoclue"); master = geoclue_master_get_default (); - priv->gc_client = geoclue_master_create_client (master, NULL, NULL); + priv->gc_client = geoclue_master_create_client (master, NULL, &error); g_object_unref (master); + if (priv->gc_client == NULL) + { + DEBUG ("Failed to GeoclueMasterClient: %s", error->message); + g_error_free (error); + return; + } + update_resources (location_manager); /* Get updated when the position is changes */ |