Fix crash cases where window container tries to touch destroyed window
Fixes: QTBUG-133289 Pick-to: 6.8 6.5 Change-Id: I4b5a6ab12c32133d633e1bf11567119d52c1cb5a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 9940f3f280473856858afafc6a4a4feab48c653f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9f1893855b
commit
0479ef1c1c
@ -424,7 +424,9 @@ void QWindowContainer::parentWasChanged(QWidget *parent)
|
||||
void QWindowContainer::parentWasMoved(QWidget *parent)
|
||||
{
|
||||
if (QWindowContainerPrivate *d = QWindowContainerPrivate::get(parent)) {
|
||||
if (d->window->parent())
|
||||
if (!d->window)
|
||||
return;
|
||||
else if (d->window->parent())
|
||||
d->updateGeometry();
|
||||
}
|
||||
qwindowcontainer_traverse(parent, parentWasMoved);
|
||||
@ -433,7 +435,9 @@ void QWindowContainer::parentWasMoved(QWidget *parent)
|
||||
void QWindowContainer::parentWasRaised(QWidget *parent)
|
||||
{
|
||||
if (QWindowContainerPrivate *d = QWindowContainerPrivate::get(parent)) {
|
||||
if (d->window->parent())
|
||||
if (!d->window)
|
||||
return;
|
||||
else if (d->window->parent())
|
||||
d->window->raise();
|
||||
}
|
||||
qwindowcontainer_traverse(parent, parentWasRaised);
|
||||
@ -442,7 +446,9 @@ void QWindowContainer::parentWasRaised(QWidget *parent)
|
||||
void QWindowContainer::parentWasLowered(QWidget *parent)
|
||||
{
|
||||
if (QWindowContainerPrivate *d = QWindowContainerPrivate::get(parent)) {
|
||||
if (d->window->parent())
|
||||
if (!d->window)
|
||||
return;
|
||||
else if (d->window->parent())
|
||||
d->window->lower();
|
||||
}
|
||||
qwindowcontainer_traverse(parent, parentWasLowered);
|
||||
|
Loading…
x
Reference in New Issue
Block a user