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

Commit 37cb759e authored by Dominik Laskowski's avatar Dominik Laskowski Committed by Automerger Merge Worker
Browse files

SF: Do not deref empty std::optional<PowerMode> am: e63a5921

parents 3525f80a e63a5921
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4900,7 +4900,7 @@ void SurfaceFlinger::setPowerModeInternal(const sp<DisplayDevice>& display, hal:
        mInterceptor->savePowerModeUpdate(display->getSequenceId(), static_cast<int32_t>(mode));
    }
    const auto refreshRate = display->refreshRateConfigs().getActiveMode()->getFps();
    if (*currentMode == hal::PowerMode::OFF) {
    if (!currentMode || *currentMode == hal::PowerMode::OFF) {
        // Turn on the display
        if (display->isInternal() && (!activeDisplay || !activeDisplay->isPoweredOn())) {
            onActiveDisplayChangedLocked(display);