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

Commit 76de8982 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Prevent calling GL functions with an invalid surface" into lmp-mr1-dev

parents e6bd61d5 a12b2405
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ CanvasContext::~CanvasContext() {

void CanvasContext::destroy() {
    stopDrawing();
    setSurface(NULL);
    freePrefetechedLayers();
    destroyHardwareResources();
    mAnimationContext->destroy();
@@ -67,7 +68,6 @@ void CanvasContext::destroy() {
        delete mCanvas;
        mCanvas = 0;
    }
    setSurface(NULL);
}

void CanvasContext::setSurface(ANativeWindow* window) {