diff options
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index cb8336d..3ea80ce 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -258,6 +258,7 @@ QGraphicsWidget::~QGraphicsWidget() //we check if we have a layout previously if (d->layout) { + delete d->layout; foreach (QGraphicsItem * item, childItems()) { // In case of a custom layout which doesn't remove and delete items, we ensure that // the parent layout item does not point to the deleted layout. This code is here to @@ -268,7 +269,6 @@ QGraphicsWidget::~QGraphicsWidget() widget->setParentLayoutItem(0); } } - delete d->layout; } // Remove this graphics widget from widgetStyles |