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

Commit 4c767a17 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

am: 07eeea78

Change-Id: I0eb2ab54daa623e97135a149ff34751ef83559eb
parents 9d549ce3 07eeea78
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -302,6 +302,9 @@ class TaskSnapshotSurface implements StartingSurface {
    }
    }


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


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