Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-05 10:30:17 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-05 10:30:17 +0400
commit690359eb8d91b34405f3188632d891fc29fe5164 (patch)
tree01c1b9d90b33391696daf80aa73e8bc6594e68a1 /intern
parent57d7c1f226811d5f6f5d73d8bd498e2b72a603c2 (diff)
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.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 01705fe8f7b..7a5bb8ab604 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -609,9 +609,12 @@ GHOST_WindowCocoa::~GHOST_WindowCocoa()
[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;
}