From 449c9c2474da0461c14e7d6ea12ff4e35c3c7aae Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 3 May 2018 14:48:56 +0200 Subject: 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 --- src/quicktemplates2/qquickoverlay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quicktemplates2/qquickoverlay.cpp') 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)); } -- cgit v1.2.3