aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-04 14:03:16 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-04 14:03:16 +0100
commite87ecaf55291ac38c705dea7eaeb7c58ad0e3284 (patch)
tree73caca8642daf0e786259036dbf0fc5cf41ce60b
parent9c050d452961f348c8bcc33e3422aed6316bb18b (diff)
parent15d1b173d030f5ae5ca72f511d33c80979503268 (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta3
-rw-r--r--src/quick/items/qquickitem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 0e035af9a6..4c20b7e2e1 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -2764,7 +2764,8 @@ void QQuickItem::setParentItem(QQuickItem *parentItem)
// as we potentially changed d->parentWindow above
// the check in derefWindow could not work
// thus, we redo it here with the old parent
- if (!oldParentItem) {
+ // Also, the window may have been deleted by derefWindow()
+ if (!oldParentItem && d->window) {
QQuickWindowPrivate::get(d->window)->parentlessItems.remove(this);
}
}