aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-05-03 14:48:56 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-05-03 12:51:14 +0000
commit3b5143bb67cdaaff6b0eabedff1034e4add7ec87 (patch)
tree807bd2af00bd4d38333b2a36bd095185e7b1d26a /src/quicktemplates2
parent337867f248ee5701c773d104d9a619aa29bb16f7 (diff)
Fix crash in tst_controls
After commit 127659c45020a83b80eeed7106c1f377a36c5c77 in qtdeclarative, QQuickWindow::contentItem() may now return a null pointer. Change-Id: I29e6aed43125d1fced620e800354abd449dfb3ae Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r--src/quicktemplates2/qquickoverlay.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp
index fe61dae2..4be28031 100644
--- a/src/quicktemplates2/qquickoverlay.cpp
+++ b/src/quicktemplates2/qquickoverlay.cpp
@@ -376,7 +376,7 @@ QQuickOverlay *QQuickOverlay::overlay(QQuickWindow *window)
QQuickItem *content = window->contentItem();
// Do not re-create the overlay if the window is being destroyed
// and thus, its content item no longer has a window associated.
- if (content->window()) {
+ if (content && content->window()) {
overlay = new QQuickOverlay(window->contentItem());
window->setProperty(name, QVariant::fromValue(overlay));
}