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

Commit 3da4ed00 authored by Arun Sharma's avatar Arun Sharma Committed by Automerger Merge Worker
Browse files

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

Merge "FastbootDevice::boot1_1 null pointer dereference" into main am: 608e33f7 am: 828d85ae am: 932fe519 am: 4a2611cc

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2768099



Change-Id: Ie00d5b40094c920bffd548284308bb21e8c0616c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5a528ef7 4a2611cc
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -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;