From 01fd1edbb074b26a054bb545ffed979100f6be12 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 14 Apr 2014 17:02:42 +0200 Subject: Fix crash when deleting top level windows embedded into QGraphicsProxyWidget. Clear proxyWidget pointer in slot QGraphicsProxyWidgetPrivate::_q_removeWidgetSlot(). Task-number: QTBUG-29684 Task-number: QTBUG-33213 Change-Id: Ibdbd52aa810ca908e3d98daa00954345e7a93a48 Reviewed-by: Andreas Aardal Hanssen (cherry picked from qtbase/ff2dbe609ef4482d66d1ecd135b4f53f6aff7e60) --- src/gui/graphicsview/qgraphicsproxywidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp index e9bbf04..b3ea09c 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp @@ -412,6 +412,10 @@ QWidget *QGraphicsProxyWidgetPrivate::findFocusChild(QWidget *child, bool next) void QGraphicsProxyWidgetPrivate::_q_removeWidgetSlot() { Q_Q(QGraphicsProxyWidget); + if (!widget.isNull()) { + if (QWExtra *extra = widget->d_func()->extra) + extra->proxyWidget = 0; + } widget = 0; delete q; } -- cgit v0.12