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

Commit 07eeea78 authored by Shibin George's avatar Shibin George Committed by android-build-merger
Browse files

Merge "Check if mSurface is valid before create SurfaceSession"

am: fe118cfd

Change-Id: I774c323f87ff9dba3dd6831b8a33e2b7161162cb
parents c8b846e1 fe118cfd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -301,6 +301,9 @@ class TaskSnapshotSurface implements StartingSurface {
    }

    private void drawSizeMismatchSnapshot(GraphicBuffer buffer) {
        if (!mSurface.isValid()) {
            throw new IllegalStateException("mSurface does not hold a valid surface.");
        }
        final SurfaceSession session = new SurfaceSession(mSurface);

        // Keep a reference to it such that it doesn't get destroyed when finalized.