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

Commit fe118cfd authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Check if mSurface is valid before create SurfaceSession"

parents 92a9847d 9696bd32
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.