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

Commit 041e0ad6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[libadapter] Fix nullpointer in acceptchanges" into oc-dev

parents 723c4898 06d5e359
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -538,6 +538,12 @@ Error HWC2On1Adapter::Display::acceptChanges() {
    for (auto& change : mChanges->getTypeChanges()) {
        auto layerId = change.first;
        auto type = change.second;
        if (mDevice.mLayers.count(layerId) == 0) {
            // This should never happen but somehow does.
            ALOGW("Cannot accept change for unknown layer (%" PRIu64 ")",
                  layerId);
            continue;
        }
        auto layer = mDevice.mLayers[layerId];
        layer->setCompositionType(type);
    }