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.
This commit is contained in:
Brecht Van Lommel 2011-05-23 15:56:26 +00:00
parent 6357b12641
commit 1e00590f1c

@ -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) {