aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-13 12:49:46 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:13:58 +0200
commit7ad3ba2dbb396552d062c9d6d75697150bee75da (patch)
tree8ec05f9b3c900bb88598b0b3ec46b3e5779b8841 /src/quick/items/qquickwindow.cpp
parenta2d115fbaffee282a1d32ed92c6700e6c3dd811b (diff)
Don't polish items if the screen is 0
The current code leads to an assertion during qapp destruction time, as the screen gets set to 0, which triggers a force polish that in turns accesses the qapp instance. In addition, we don't need to do any work when the screen is 0, as the window can't be visble in that case. Once it gets visible again, forcePolish() will be called again. Change-Id: I81d9a11e494b4573a56d06bca651cc6b5fa785c7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index c99865e331..5b4145e235 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -298,6 +298,8 @@ void forcePolishHelper(QQuickItem *item)
void QQuickWindow::forcePolish()
{
Q_D(QQuickWindow);
+ if (!screen())
+ return;
forcePolishHelper(d->contentItem);
}