Workaround for crash on derefWindow on application shutdown
Ideally there shouldn't be nullptrs in the list. This fix will however prevent crashes, until we find out why. Fixes: QTBUG-116426 Pick-to: 6.6.2 6.5 Change-Id: I2c85ad73832ab4d8b9992b4d8e661758fae85ac7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit5d79b207c7
) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commitfe0b983fc5
)
This commit is contained in:
parent
f17168ef87
commit
e6811c930e
|
@ -3045,8 +3045,8 @@ void QQuickItemPrivate::derefWindow()
|
|||
paintNode = nullptr;
|
||||
|
||||
for (int ii = 0; ii < childItems.size(); ++ii) {
|
||||
QQuickItem *child = childItems.at(ii);
|
||||
QQuickItemPrivate::get(child)->derefWindow();
|
||||
if (QQuickItem *child = childItems.at(ii))
|
||||
QQuickItemPrivate::get(child)->derefWindow();
|
||||
}
|
||||
|
||||
dirty(Window);
|
||||
|
|
Loading…
Reference in New Issue