From 0a65246c0264c4c21af196f87df644b8a223dbed 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: I64b8e1b9c34c56100944192989e03b2dc56c8dc1 Reviewed-by: Simon Hausmann --- src/quicktemplates2/qquickoverlay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- cgit v1.2.3