diff options
author | Fabian Bumberger <fbumberger@rim.com> | 2013-03-05 17:58:24 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-05 21:56:52 +0100 |
commit | 15768381ad5f6b7f094e8a90dabeff97a9d62b88 (patch) | |
tree | a9e2fe5fd3514bbfeb0f1f87c63d9d2c64a55505 /src/plugins/platforms/qnx/qqnxwindow.cpp | |
parent | f2162d04d23acd27ee641a07286f30f5581fe6bf (diff) |
Delete the reference of the QNX screen in child windows on deletion
Change-Id: Ic3e5deaeabe282ff44400aba80f8746067473030
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxwindow.cpp')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxwindow.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 43e24034c9..cabbd405e5 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -156,7 +156,8 @@ QQnxWindow::~QQnxWindow() // Remove from parent's Hierarchy. removeFromParent(); - m_screen->updateHierarchy(); + if (m_screen) + m_screen->updateHierarchy(); // Cleanup QNX window and its buffers screen_destroy_window(m_window); @@ -497,6 +498,11 @@ void QQnxWindow::setScreen(QQnxScreen *platformScreen) { qWindowDebug() << Q_FUNC_INFO << "window =" << window() << "platformScreen =" << platformScreen; + if (platformScreen == 0) { // The screen has been destroyed + m_screen = 0; + return; + } + if (m_screen == platformScreen) return; @@ -539,7 +545,7 @@ void QQnxWindow::removeFromParent() m_parentWindow = 0; else qFatal("QQnxWindow: Window Hierarchy broken; window has parent, but parent hasn't got child."); - } else { + } else if (m_screen) { m_screen->removeWindow(this); } } |