summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index b50a43378599..92a30e5dd29a 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -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) {