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

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

Merge "SurfaceFlinger: check for nullptr on setFrameTimelineVsync"

parents c954b3eb fdf1bffc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -6189,6 +6189,11 @@ status_t SurfaceFlinger::setFrameTimelineVsync(const sp<IGraphicBufferProducer>&
    }

    sp<Layer> layer = (static_cast<MonitoredProducer*>(surface.get()))->getLayer();
    if (layer == nullptr) {
        ALOGE("Attempt to set frame timeline vsync on a layer that no longer exists");
        return BAD_VALUE;
    }

    layer->setFrameTimelineVsync(frameTimelineVsyncId);
    return NO_ERROR;
}