summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kaiser <gkaiser@google.com>2022-01-26 07:36:21 -0800
committerGreg Kaiser <gkaiser@google.com>2022-01-26 07:36:21 -0800
commit9d202e39e8fa7dda038b326d36c2759e8b9fc92d (patch)
tree3896901c3af06f6db10e708b2c2ab48fe3216f2f
parent456916cde09a529fcb0f5ad06c1eb27f2e494e2e (diff)
HAL: Fix nullptr check
We had our null check reversed, so we fix that. Test: TreeHugger Bug: 203490261 Change-Id: I2cbe2983857d86fdc524e26b5ce342245879cf6d
-rw-r--r--system/audio_hal_interface/aidl/client_interface.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/audio_hal_interface/aidl/client_interface.cc b/system/audio_hal_interface/aidl/client_interface.cc
index f0af070d4d..9626ecdb40 100644
--- a/system/audio_hal_interface/aidl/client_interface.cc
+++ b/system/audio_hal_interface/aidl/client_interface.cc
@@ -176,7 +176,7 @@ BluetoothAudioSourceClientInterface::~BluetoothAudioSourceClientInterface() {
void BluetoothAudioClientInterface::binderDiedCallbackAidl(void* ptr) {
LOG(WARNING) << __func__ << ": restarting connection with new Audio Hal";
auto client = static_cast<BluetoothAudioClientInterface*>(ptr);
- if (client != nullptr) {
+ if (client == nullptr) {
LOG(ERROR) << __func__ << ": null audio HAL died!";
return;
}
@@ -493,4 +493,4 @@ size_t BluetoothAudioSourceClientInterface::WriteAudioData(const uint8_t* p_buf,
} // namespace aidl
} // namespace audio
-} // namespace bluetooth \ No newline at end of file
+} // namespace bluetooth