summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/node.cpp
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2011-08-20 21:59:35 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-08-22 09:50:16 (GMT)
commite828368117ea34bbeac60e910dea170e868a82c3 (patch)
treeba4a3b345e30b7a2f97ce9ba982e73f5602297be /tools/qdoc3/node.cpp
parenta3f2ac29714744fb7a34aa7789ce89cb58c09de7 (diff)
downloadQt-e828368117ea34bbeac60e910dea170e868a82c3.zip
Qt-e828368117ea34bbeac60e910dea170e868a82c3.tar.gz
Qt-e828368117ea34bbeac60e910dea170e868a82c3.tar.bz2
don't crash when destroying children
this was uncovered by my don't-detach patch. Reviewed-by: ossi
Diffstat (limited to 'tools/qdoc3/node.cpp')
-rw-r--r--tools/qdoc3/node.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 683c210..56d76d3 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -545,7 +545,8 @@ void InnerNode::removeFromRelated()
*/
void InnerNode::deleteChildren()
{
- qDeleteAll(children);
+ NodeList childrenCopy = children; // `children` will be changed in ~Node()
+ qDeleteAll(childrenCopy);
}
/*!