SpatialAudio: fix crashes in BluetoothAudioSession

Bug: 224578221
Bug: 214615268
Test: build
Change-Id: I0fd7e0887200e39dc996b0d84de421ec13897e94
This commit is contained in:
Chen Chen
2022-03-14 13:16:44 -07:00
parent 5ee0d1534e
commit 3b46c05d95

View File

@@ -431,7 +431,9 @@ void BluetoothAudioSession::ReportLowLatencyModeAllowedChanged(bool allowed) {
std::shared_ptr<PortStatusCallbacks> callback = observer.second;
LOG(INFO) << __func__
<< " - allowed=" << (allowed ? " allowed" : " disallowed");
callback->low_latency_mode_allowed_cb_(cookie, allowed);
if (callback->low_latency_mode_allowed_cb_ != nullptr) {
callback->low_latency_mode_allowed_cb_(cookie, allowed);
}
}
}