diff options
Diffstat (limited to 'hcid/adapter.c')
-rw-r--r-- | hcid/adapter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c index 09248528..4374cef4 100644 --- a/hcid/adapter.c +++ b/hcid/adapter.c @@ -2438,6 +2438,11 @@ void adapter_remove_device(DBusConnection *conn, struct adapter *adapter, DBUS_TYPE_INVALID); } + if (device->agent) { + agent_destroy(device->agent, FALSE); + device->agent = NULL; + } + device_remove(device, conn); adapter->devices = g_slist_remove(adapter->devices, device); } |