Skip to content

bluetooth: Fix device->adapter dependency while releasing discovery

Change d7f95170 from !638 (merged) added a dependency on device adapter pointer being valid while checking if bluetooth profile is supported by device.

When adapter object is released, each device holding pointer to adapter being released is notified to reset that to NULL. Since adapter objects are released first when discovery object is unreferenced, each device will have adapter pointer reset before the time device objects are released.

Fix observed crash by examining device adapter pointer. If it is NULL report that device does not support any bluetooth profile instead of looking at UUIDs supported by adapter.

Edited by Igor Kovalenko

Merge request reports