From da3c2603bcfcd92b56ca0c54a14eb8acaa82a3b8 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 22 Jul 2014 15:38:26 +0200 Subject: [PATCH] Don't try to delete the same items more than once! --- code/studio/src/plugins/tile_editor/tile_item.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/studio/src/plugins/tile_editor/tile_item.cpp b/code/studio/src/plugins/tile_editor/tile_item.cpp index 9d9418561..ef80cc302 100644 --- a/code/studio/src/plugins/tile_editor/tile_item.cpp +++ b/code/studio/src/plugins/tile_editor/tile_item.cpp @@ -35,6 +35,7 @@ Node::Node(const QVector &data, Node *parent) Node::~Node() { qDeleteAll(m_childItems); + m_childItems.clear(); } void Node::appendChild(Node *item) @@ -164,6 +165,7 @@ TileSetNode::TileSetNode(QString tileSetName, Node *parent) : m_tileSetName(tile TileSetNode::~TileSetNode() { qDeleteAll(m_childItems); + m_childItems.clear(); } QVariant TileSetNode::data(int column, int role) const @@ -191,6 +193,7 @@ TileTypeNode::TileTypeNode(TileModel::TNodeTileType type, Node *parent) : m_node TileTypeNode::~TileTypeNode() { qDeleteAll(m_childItems); + m_childItems.clear(); } QVariant TileTypeNode::data(int column, int role) const