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

Commit a89226dd authored by Vishnu Nair's avatar Vishnu Nair Committed by Automerger Merge Worker
Browse files

Merge "[sf] Fix crash caused by invalid access of...

Merge "[sf] Fix crash caused by invalid access of mPreviouslyPresentedLayerStacks" into udc-dev am: 1ca597f4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/22953793



Change-Id: I5b160a22f1c63458f8722c8a345ed6711706473a
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 551fb515 1ca597f4
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -2885,7 +2885,10 @@ void SurfaceFlinger::postComposition(nsecs_t callTime) {
    }
    }


    for (auto layer : mLayersWithBuffersRemoved) {
    for (auto layer : mLayersWithBuffersRemoved) {
        for (auto layerStack : layer->mPreviouslyPresentedLayerStacks) {
        std::vector<ui::LayerStack> previouslyPresentedLayerStacks =
                std::move(layer->mPreviouslyPresentedLayerStacks);
        layer->mPreviouslyPresentedLayerStacks.clear();
        for (auto layerStack : previouslyPresentedLayerStacks) {
            auto optDisplay = layerStackToDisplay.get(layerStack);
            auto optDisplay = layerStackToDisplay.get(layerStack);
            if (optDisplay && !optDisplay->get()->isVirtual()) {
            if (optDisplay && !optDisplay->get()->isVirtual()) {
                auto fence = getHwComposer().getPresentFence(optDisplay->get()->getPhysicalId());
                auto fence = getHwComposer().getPresentFence(optDisplay->get()->getPhysicalId());