From db835040e0646c3457c39bcd098f5acbef4c4767 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 9 Nov 2024 22:46:52 +0100 Subject: [PATCH] QWidget: delete 'extra' in dtor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 006cbf658ea1f5986bbe1baafa7c146780320661. Task-number: QTBUG-130932 Change-Id: I9109072a457cc01abd5d1b4e844a3ed3309d942b Reviewed-by: Tor Arne Vestbø Reviewed-by: Volker Hilsheimer (cherry picked from commit 482c41fb6187f3ee1df11e7936fb60f65d12995a) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit a6a0a38343fba73b12e63777cf7cd5817e65f7d5) --- src/widgets/kernel/qwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 414b91af150..a58a3633358 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1581,6 +1581,7 @@ QWidget::~QWidget() #if QT_CONFIG(graphicseffect) delete d->graphicsEffect; #endif + d->deleteExtra(); d->isWidget = false; }