Index: src/views/mac/SkNSView.mm |
diff --git a/src/views/mac/SkNSView.mm b/src/views/mac/SkNSView.mm |
index 67141679dbd8eaffc2e8515f5095e4c5eef95e81..e1e03d670b1e57e6c3a2a10d5fc14acd1b2af3bd 100644 |
--- a/src/views/mac/SkNSView.mm |
+++ b/src/views/mac/SkNSView.mm |
@@ -118,12 +118,17 @@ SK_COMPILE_ASSERT(SK_SUPPORT_GPU, not_implemented_for_non_gpu_build); |
} |
- (void)dealloc { |
- delete fWind; |
+ [self freeNativeWind]; |
self.fGLContext = nil; |
self.fTitle = nil; |
[super dealloc]; |
} |
+- (void)freeNativeWind { |
+ delete fWind; |
+ fWind = nil; |
+} |
+ |
//////////////////////////////////////////////////////////////////////////////// |
- (void)drawSkia { |