From 0aa2e0bad31d7102034952cf95b6d43829c91d30 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 23 May 2017 11:28:08 +0200 Subject: [PATCH] bluetooth: unhook adapter properties callback when the adapter vanishes https://bugzilla.redhat.com/show_bug.cgi?id=1454654 --- src/devices/bluetooth/nm-bluez-device.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/devices/bluetooth/nm-bluez-device.c b/src/devices/bluetooth/nm-bluez-device.c index ebfa0d647e..41ef74cae7 100644 --- a/src/devices/bluetooth/nm-bluez-device.c +++ b/src/devices/bluetooth/nm-bluez-device.c @@ -1187,7 +1187,11 @@ dispose (GObject *object) g_slist_free_full (priv->connections, g_object_unref); priv->connections = NULL; - g_clear_object (&priv->adapter5); + if (priv->adapter5) { + g_signal_handlers_disconnect_by_func (priv->adapter5, adapter5_on_properties_changed, self); + g_clear_object (&priv->adapter5); + } + g_clear_object (&priv->dbus_connection); G_OBJECT_CLASS (nm_bluez_device_parent_class)->dispose (object);