cocoa: Do not access the integration instance when shutting down

Task-number: QTBUG-46016
Change-Id: Icb7f0c73d5fe944538e2b9abf50c2532037e932f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit is contained in:
Laszlo Agocs 2015-05-08 16:41:40 +02:00
parent ba323b04cd
commit 49107dd53b

View File

@ -435,7 +435,9 @@ QCocoaWindow::~QCocoaWindow()
// While it is unlikely that this window will be in the popup stack // While it is unlikely that this window will be in the popup stack
// during deletetion we clear any pointers here to make sure. // during deletetion we clear any pointers here to make sure.
QCocoaIntegration::instance()->popupWindowStack()->removeAll(this); if (QCocoaIntegration::instance()) {
QCocoaIntegration::instance()->popupWindowStack()->removeAll(this);
}
foreach (QCocoaWindow *child, m_childWindows) { foreach (QCocoaWindow *child, m_childWindows) {
[m_nsWindow removeChildWindow:child->m_nsWindow]; [m_nsWindow removeChildWindow:child->m_nsWindow];