[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52781] trunk/blender/intern/ghost/intern/ GHOST_WindowCocoa.mm: Fix crash opening some .blend files on OS X 10. 8 with double click or drag and
Brecht Van Lommel
brechtvanlommel at pandora.be
Wed Dec 5 07:30:21 CET 2012
Revision: 52781
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52781
Author: blendix
Date: 2012-12-05 06:30:17 +0000 (Wed, 05 Dec 2012)
Log Message:
-----------
Fix crash opening some .blend files on OS X 10.8 with double click or drag and
drop onto the application.
It seems something changed in the operating which makes our method of releasing
windows crash. Previously we called [m_window release], but on 10.8 this does
not remove the window from [NSApp orderedWindows] and perhaps other places,
leading to crashes. So instead we set setReleasedWhenClosed back to YES right
before closing, which will then do the cleanup for us.
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 2012-12-05 03:38:01 UTC (rev 52780)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm 2012-12-05 06:30:17 UTC (rev 52781)
@@ -609,9 +609,12 @@
[m_openGLView release];
if (m_window) {
+ // previously we called [m_window release], but on 10.8 this does not
+ // remove the window from [NSApp orderedWindows] and perhaps other
+ // places, leading to crashes. so instead we set setReleasedWhenClosed
+ // back to YES right before closing
+ [m_window setReleasedWhenClosed:YES];
[m_window close];
- [[m_window delegate] release];
- [m_window release];
m_window = nil;
}
More information about the Bf-blender-cvs
mailing list