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

Commit 6cb9df5f authored by Bill Schilit's avatar Bill Schilit
Browse files

Prevent nullptr usage when packet tracing and connection goes away.

Test: manual
Bug: 264469240

Change-Id: I14115e04c959c3d3e4c15a075c997c2a7fb2f667
parent dc83206e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -104,8 +104,10 @@ void HciSniffer::TimerTick() { transport_->TimerTick(); }

void HciSniffer::Close() {
  transport_->Close();
  if (output_ != nullptr) {
    output_->flush();
  }
}

void HciSniffer::SendEvent(const std::vector<uint8_t>& packet) {
  AppendRecord(PacketDirection::CONTROLLER_TO_HOST, PacketType::EVENT, packet);