aboutsummaryrefslogtreecommitdiffstats
path: root/src/location-geoclue.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/location-geoclue.c')
-rw-r--r--src/location-geoclue.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/location-geoclue.c b/src/location-geoclue.c
index 5be651f..d420457 100644
--- a/src/location-geoclue.c
+++ b/src/location-geoclue.c
@@ -67,9 +67,13 @@ location_geoclue_start(location_geoclue_state_t *state)
g_object_unref(master);
if (client == NULL) {
- g_printerr(_("Unable to obtain master client: %s\n"),
- error->message);
- g_error_free(error);
+ if (error != NULL) {
+ g_printerr(_("Unable to obtain master client: %s\n"),
+ error->message);
+ g_error_free(error);
+ } else {
+ g_printerr(_("Unable to obtain master client\n"));
+ }
return -1;
}
@@ -78,9 +82,13 @@ location_geoclue_start(location_geoclue_state_t *state)
0, FALSE,
GEOCLUE_RESOURCE_NETWORK,
&error)) {
- g_printerr(_("Can't set requirements for master: %s\n"),
- error->message);
- g_error_free(error);
+ if (error != NULL) {
+ g_printerr(_("Can't set requirements for master: %s\n"),
+ error->message);
+ g_error_free(error);
+ } else {
+ g_printerr(_("Can't set requirements for master\n"));
+ }
g_object_unref(client);
return -1;