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

Commit ca0b33cf authored by Fabien Sanglard's avatar Fabien Sanglard Committed by android-build-merger
Browse files

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

am: 041e0ad6

Change-Id: I2271e20a406d6278156437b9064efedcdb5ce315
parents 32306fbe 041e0ad6
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);
    }