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

Commit 0ffe5a20 authored by Ugo Yu's avatar Ugo Yu
Browse files

Add null check in AVRCP dumpsys

Tag: #stability
Bug: 158438628
Bug: 205900655
Test: adb shell dumpsys bluetooth_manager
Change-Id: Id02951cacf3757769c1ebfa207193577ce15d90e
parent 57b170b3
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -526,7 +526,13 @@ void AvrcpService::DebugDump(int fd) {
    return;
    return;
  }
  }


  auto device_list = instance_->connection_handler_->GetListOfDevices();
  auto handler = instance_->connection_handler_;
  if (handler == nullptr) {
    dprintf(fd, "\nAVRCP connection handler is null\n");
    return;
  }

  auto device_list = handler->GetListOfDevices();
  dprintf(fd, "\nAVRCP Target Native Service: %zu devices\n",
  dprintf(fd, "\nAVRCP Target Native Service: %zu devices\n",
          device_list.size());
          device_list.size());