summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-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 118e12465e1b..6fdf65e6722d 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -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) {