aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickoverlay.cpp
diff options
context:
space:
mode:
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 f30f6a5e..9651baeb 100644
--- a/src/quicktemplates2/qquickoverlay.cpp
+++ b/src/quicktemplates2/qquickoverlay.cpp
@@ -453,7 +453,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));
}