summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnswindowdelegate.mm
diff options
context:
space:
mode:
authorMorten Sorvig <morten.sorvig@nokia.com>2011-08-15 13:50:22 +0200
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2011-08-18 09:50:06 +0200
commit4e6c4d50a5fe10e355802ac05ce143aed32cffb4 (patch)
treee92dfdc843ddb51dca07f09998d22fac8fd5665a /src/plugins/platforms/cocoa/qnswindowdelegate.mm
parentc9d1adb7fa42cb36e5da0fb691efb6fd61f4d2f2 (diff)
Fix crash-on-exit in qmlscene.
Take control over NSWindow deletion to make sure it's lifetime matches that of the QCocoaWindow. Change-Id: Ia10006d814345356e6aebe7fa1f9a0e012535786 Reviewed-on: http://codereview.qt.nokia.com/2960 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnswindowdelegate.mm')
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
index 6521db5cf7..869ef7840b 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
@@ -75,7 +75,9 @@
- (void)windowWillClose:(NSNotification *)notification
{
Q_UNUSED(notification);
- QWindowSystemInterface::handleCloseEvent(m_cocoaWindow->window());
+ if (m_cocoaWindow) {
+ m_cocoaWindow->windowWillClose();
+ }
}
@end