summaryrefslogtreecommitdiff
path: root/lib/bluetooth-agent.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2021-12-15 15:25:21 +0100
committerBastien Nocera <hadess@hadess.net>2021-12-15 17:14:43 +0100
commitb7f179805a6be40312e5f61d0d2028887887a23c (patch)
treebc5e6a1446882f450a683edc9833c459bdfc13eb /lib/bluetooth-agent.c
parentf33f18fd7c6fffcaba18446754cdf59e7988fa17 (diff)
downloadgnome-bluetooth-b7f179805a6be40312e5f61d0d2028887887a23c.tar.gz
agent: Avoid agent re-registration warning
Bluetooth-CRITICAL **: bluetooth_agent_register: assertion 'agent->path != NULL' failed
Diffstat (limited to 'lib/bluetooth-agent.c')
-rw-r--r--lib/bluetooth-agent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bluetooth-agent.c b/lib/bluetooth-agent.c
index 4e82a74e..47420feb 100644
--- a/lib/bluetooth-agent.c
+++ b/lib/bluetooth-agent.c
@@ -369,6 +369,7 @@ static void bluetooth_agent_finalize(GObject *object)
bluetooth_agent_unregister (agent);
+ g_clear_pointer (&agent->path, g_free);
g_bus_unwatch_name (agent->watch_id);
g_free (agent->busname);
g_dbus_node_info_unref (agent->introspection_data);
@@ -536,7 +537,6 @@ gboolean bluetooth_agent_unregister(BluetoothAgent *agent)
NULL, agent_unregister_cb, NULL);
g_clear_object (&agent->agent_manager);
- g_clear_pointer (&agent->path, g_free);
g_clear_pointer (&agent->busname, g_free);
if (agent->reg_id > 0) {