aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickoverlay.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-05-03 14:48:56 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-07-16 09:42:59 +0000
commit449c9c2474da0461c14e7d6ea12ff4e35c3c7aae (patch)
tree8705fc6ed035c67db23da6646d5f6190bf7222dd /src/quicktemplates2/qquickoverlay.cpp
parent62abe69e45a8958006b7b83cf1de6033be431eeb (diff)
Fix crash on exit when using a shader and a Popup
3b5143bb67cdaaff6b0eabedff1034e4add7ec87 already fixed a crash with the same stack trace in dev. The same fix works with the referenced bug report. Task-number: QTBUG-66483 Change-Id: I05450d2ff40f317d9b5b59e28991fa92b414022e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickoverlay.cpp')
-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 16ba714b..cf72c8a6 100644
--- a/src/quicktemplates2/qquickoverlay.cpp
+++ b/src/quicktemplates2/qquickoverlay.cpp
@@ -370,7 +370,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));
}