Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22f93cb7 authored by Alice Kuo's avatar Alice Kuo
Browse files

Fix suspendStream crash caused by invalid mDataMQ

Bug: 150670922
Test: start music with le audio headset and then suspend
Change-Id: I6cdfc289297d7277ba885f77f6516e88f4e97356
parent bf3995a5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -985,6 +985,10 @@ int BluetoothAudioClientInterface::EndSession() {
}

void BluetoothAudioClientInterface::FlushAudioData() {
  if (mDataMQ == nullptr || !mDataMQ->isValid()) {
    LOG(WARNING) << __func__ << ", mDataMQ invalid";
    return;
  }
  size_t size = mDataMQ->availableToRead();
  uint8_t p_buf[size];