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

Commit 6afc5cf3 authored by John Reck's avatar John Reck Committed by Gerrit Code Review
Browse files

Merge "Prevent calling GL functions with an invalid surface"

parents ee7c30e1 f76d36f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ CanvasContext::~CanvasContext() {

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

void CanvasContext::setSurface(ANativeWindow* window) {