diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-04 11:12:01 +0100 |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-04 11:33:11 +0100 |
commit | 43e4e8969942e58ca0ecb3b8ad23ebe32ac4aa44 (patch) | |
tree | cc534af4ca210f11342f887b93686903b5544251 /src/gui/graphicsview/qgraphicsitem.cpp | |
parent | c0b81480b2909b18ac15bdd124a562ae005c2f41 (diff) | |
download | qt4-tools-43e4e8969942e58ca0ecb3b8ad23ebe32ac4aa44.tar.gz |
Fix crash when QGraphicsItem destructor deletes other QGraphicsItem
Same fix as e7a10b00be3e4aa197900ecf424e6d44b07248ae
Reviewed-by: Alexis
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index bb45e7e9c2..b54596bb23 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1341,8 +1341,8 @@ QGraphicsItem::~QGraphicsItem() } if (!d_ptr->children.isEmpty()) { - QList<QGraphicsItem *> oldChildren = d_ptr->children; - qDeleteAll(oldChildren); + while (!d_ptr->children.isEmpty()) + delete d_ptr->children.first(); Q_ASSERT(d_ptr->children.isEmpty()); } |