diff options
author | Morten Sorvig <morten.sorvig@nokia.com> | 2011-08-15 13:50:22 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2011-08-18 09:50:06 +0200 |
commit | 4e6c4d50a5fe10e355802ac05ce143aed32cffb4 (patch) | |
tree | e92dfdc843ddb51dca07f09998d22fac8fd5665a /src/plugins/platforms/cocoa/qnswindowdelegate.mm | |
parent | c9d1adb7fa42cb36e5da0fb691efb6fd61f4d2f2 (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.mm | 4 |
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 |