Fix crash when setting Qt::WA_StaticContents on a transient child

Bail out of QWidgetBackingStore::updateLists() when a
top level transient child is encountered, preventing from
adding children of other top level windows to its list.

Task-number: QTBUG-70085
Change-Id: Ibd748ab959af9bfe7fe0622494936b0c109ab25a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Friedemann Kleint 2018-08-27 14:11:14 +02:00
parent d115196010
commit deab54f84f
1 changed files with 1 additions and 1 deletions

View File

@ -760,7 +760,7 @@ void QWidgetBackingStore::updateLists(QWidget *cur)
QList<QObject*> children = cur->children();
for (int i = 0; i < children.size(); ++i) {
QWidget *child = qobject_cast<QWidget*>(children.at(i));
if (!child)
if (!child || child->isWindow())
continue;
updateLists(child);