mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Guard discovery callbacks with a lock.
This commit is contained in:
@@ -159,7 +159,7 @@ void MonitoredBluetoothDevice::onPropertiesChanged(
|
||||
observer->DeviceConnectedStateChanged(*this, it->second);
|
||||
}
|
||||
} else if (it->first == bluez::DEVICE_NAME) {
|
||||
auto callback = discovery_cb_.lock();
|
||||
auto callback = GetDiscoveryCallback();
|
||||
if (callback != nullptr && callback->device_name_changed_cb != nullptr)
|
||||
callback->device_name_changed_cb(*this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user