aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleApp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode/SampleApp.cpp')
-rw-r--r--samplecode/SampleApp.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 3ab9e8918a..1d50b5cbdb 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -224,8 +224,6 @@ public:
}
virtual void tearDownBackend(SampleWindow *win) {
- win->detach();
- fBackend = kNone_BackEndType;
SkSafeUnref(fCurContext);
fCurContext = NULL;
@@ -235,6 +233,9 @@ public:
SkSafeUnref(fCurRenderTarget);
fCurRenderTarget = NULL;
+
+ win->detach();
+ fBackend = kNone_BackEndType;
}
virtual bool prepareCanvas(SampleWindow::DeviceType dType,