summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2018-05-03 13:07:20 +0200
committerZeeshan Ali <zeenix@collabora.co.uk>2018-05-03 14:07:34 +0200
commitf7b0c52a29515dfa4a862564a206a665a5ad55c1 (patch)
tree53e97ae8f657c3e740729ce6eb25ceb9a17f3bce
parentecfd989907a8e99e0eb12ca3b25df00d32d634fb (diff)
service-client: Fix crash on startup
Make sure to not dereference a NULL StartData when geoclue gets started. https://bugs.freedesktop.org/show_bug.cgi?id=106236
-rw-r--r--src/gclue-service-client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gclue-service-client.c b/src/gclue-service-client.c
index b969db6..a5bfa2c 100644
--- a/src/gclue-service-client.c
+++ b/src/gclue-service-client.c
@@ -460,6 +460,8 @@ handle_pending_auth (gpointer user_data)
StartData *data = priv->pending_auth_start_data;
guint32 uid;
+ g_return_val_if_fail (data != NULL, G_SOURCE_REMOVE);
+
uid = gclue_client_info_get_user_id (priv->client_info);
if (priv->agent_proxy == NULL) {
g_dbus_method_invocation_return_error (data->invocation,
@@ -698,7 +700,8 @@ gclue_service_client_set_property (GObject *object,
"g-properties-changed",
G_CALLBACK (on_agent_props_changed),
object);
- handle_pending_auth (client);
+ if (client->priv->pending_auth_start_data != NULL)
+ handle_pending_auth (client);
break;
default: