diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-07-30 10:09:16 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2009-07-30 10:12:07 (GMT) |
commit | e181f8754bccb13cb59212f279e05c20cb76db62 (patch) | |
tree | 177c5f4ed577bf6dce40b8538ed9a31329854bb6 /src/gui | |
parent | 776c4a5b8035b87d011b8e431c3d9e970ad98cd9 (diff) | |
download | Qt-e181f8754bccb13cb59212f279e05c20cb76db62.zip Qt-e181f8754bccb13cb59212f279e05c20cb76db62.tar.gz Qt-e181f8754bccb13cb59212f279e05c20cb76db62.tar.bz2 |
Avoids comparing a pointer (d->layout) after deleted in qgraphicswidget
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui')
-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 3ea80ce..cb8336d 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -258,7 +258,6 @@ 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 @@ -269,6 +268,7 @@ QGraphicsWidget::~QGraphicsWidget() widget->setParentLayoutItem(0); } } + delete d->layout; } // Remove this graphics widget from widgetStyles |