Skip to content

Commit

Permalink
QWidget: delete 'extra' in dtor
Browse files Browse the repository at this point in the history
Call d->deleteExtra() in dtor of QWidget to make sure it's cleaned up
before QWidgetPrivate calls it which might access the already deleted
QWidget through deleteTLSysExtra() /
QWindowContainer::toplevelAboutToBeDestroyed(q).

Amends 006cbf6.

Task-number: QTBUG-130932
Change-Id: I9109072a457cc01abd5d1b4e844a3ed3309d942b
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
(cherry picked from commit 482c41f)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
(cherry picked from commit a6a0a38)
  • Loading branch information
chehrlic authored and Qt Cherry-pick Bot committed Nov 12, 2024
1 parent fab9466 commit db83504
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/widgets/kernel/qwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,7 @@ QWidget::~QWidget()
#if QT_CONFIG(graphicseffect)
delete d->graphicsEffect;
#endif
d->deleteExtra();

d->isWidget = false;
}
Expand Down

0 comments on commit db83504

Please sign in to comment.