summaryrefslogtreecommitdiff
path: root/libgeoclue
diff options
context:
space:
mode:
Diffstat (limited to 'libgeoclue')
-rw-r--r--libgeoclue/gclue-simple.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libgeoclue/gclue-simple.c b/libgeoclue/gclue-simple.c
index 0915761..b0c1301 100644
--- a/libgeoclue/gclue-simple.c
+++ b/libgeoclue/gclue-simple.c
@@ -284,8 +284,10 @@ on_client_started (GObject *source_object,
gclue_client_call_start_finish (client, res, &error);
if (error != NULL) {
+ GClueSimple *simple = g_task_get_source_object (task);
+
g_task_return_error (task, error);
- g_object_unref (task);
+ g_clear_object (&simple->priv->task);
}
}
@@ -302,7 +304,7 @@ on_client_created (GObject *source_object,
priv->client = gclue_client_proxy_create_finish (res, &error);
if (error != NULL) {
g_task_return_error (task, error);
- g_object_unref (task);
+ g_clear_object (&priv->task);
return;
}