diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-05-23 19:56:26 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-05-23 19:56:26 +0400 |
commit | 1e00590f1c2f8d98ed52f8e12d70723165edc9d3 (patch) | |
tree | 2ec066bf1802cc0a24bde4444ef305e447759369 /intern | |
parent | 6357b126413db0a66e820a36083de59db66cfb00 (diff) |
Fix #26728: crash with load/save on Mac, on files that close & open a window
when loading them. Custom cursor shown during load was not freed correctly
when closing the old window, which resulted in unpredictable crashes later on.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 8d28c9d5b17..fb7d4a459c7 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -461,9 +461,13 @@ GHOST_WindowCocoa::GHOST_WindowCocoa( GHOST_WindowCocoa::~GHOST_WindowCocoa() { - if (m_customCursor) delete m_customCursor; - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + if (m_customCursor) { + [m_customCursor release]; + m_customCursor = nil; + } + [m_openGLView release]; if (m_window) { |