Merge "Prevent calling GL functions with an invalid surface"

This commit is contained in:
John Reck
2014-12-01 21:28:26 +00:00
committed by Gerrit Code Review

View File

@@ -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) {