Merge "FastbootDevice::boot1_1 null pointer dereference" into main

This commit is contained in:
Arun Sharma 2023-10-05 17:33:34 +00:00 committed by Gerrit Code Review
commit 608e33f736

View file

@ -151,7 +151,8 @@ std::string FastbootDevice::GetCurrentSlot() {
} }
BootControlClient* FastbootDevice::boot1_1() const { BootControlClient* FastbootDevice::boot1_1() const {
if (boot_control_hal_->GetVersion() >= android::hal::BootControlVersion::BOOTCTL_V1_1) { if (boot_control_hal_ &&
boot_control_hal_->GetVersion() >= android::hal::BootControlVersion::BOOTCTL_V1_1) {
return boot_control_hal_.get(); return boot_control_hal_.get();
} }
return nullptr; return nullptr;