Revision: 36840
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36840
Author:   blendix
Date:     2011-05-23 15:56:26 +0000 (Mon, 23 May 2011)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm      2011-05-23 
15:46:09 UTC (rev 36839)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm      2011-05-23 
15:56:26 UTC (rev 36840)
@@ -461,9 +461,13 @@
 
 GHOST_WindowCocoa::~GHOST_WindowCocoa()
 {
-       if (m_customCursor) delete m_customCursor;
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       if (m_customCursor) {
+               [m_customCursor release];
+               m_customCursor = nil;
+       }
+
        [m_openGLView release];
        
        if (m_window) {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to