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

Commit 6e76e4ff authored by Shao-Chuan Lee's avatar Shao-Chuan Lee Committed by Matt Buckley
Browse files

Add null check in PowerAdvisor::supportsPowerHintSession

halWrapper can be null in some cases.

Bug: 240341302
Test: ARCVM boots
Change-Id: I768820c31f1ae8929851212f5ecb310e2b3a9098
(cherry picked from commit 65a2c197)
parent 901a5975
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ bool PowerAdvisor::supportsPowerHintSession() {
    if (!mSupportsPowerHint.has_value()) {
        std::lock_guard lock(mPowerHalMutex);
        HalWrapper* const halWrapper = getPowerHal();
        mSupportsPowerHint = halWrapper->supportsPowerHintSession();
        mSupportsPowerHint = halWrapper && halWrapper->supportsPowerHintSession();
    }
    return *mSupportsPowerHint;
}