commit | 3b46c05d95a87da8d76a308a19fdf07ee7c76ae5 | [log] [tgz] |
---|---|---|
author | Chen Chen <cncn@google.com> | Mon Mar 14 13:16:44 2022 -0700 |
committer | Chen Chen <cncn@google.com> | Mon Mar 14 18:04:27 2022 -0700 |
tree | 812de35b62f94cd06f2c6018d043bbd6d9aaaccf | |
parent | 5ee0d1534eaa4c06257ede39e11b9643a8003ba9 [diff] |
SpatialAudio: fix crashes in BluetoothAudioSession Bug: 224578221 Bug: 214615268 Test: build Change-Id: I0fd7e0887200e39dc996b0d84de421ec13897e94
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp index 37ac967..cdee520 100644 --- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp +++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp
@@ -431,7 +431,9 @@ 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); + } } }