diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2010-06-09 06:31:24 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2010-06-09 06:33:51 (GMT) |
commit | 82bd909140fc2bd0dc53ff024bb72bd0a3b342e2 (patch) | |
tree | 94cebab74ea76e95c3cd1ed51ce115592d67fac7 /tools | |
parent | b42a7c06f0a079fff9c0da90dd4dc71fe50397f9 (diff) | |
download | Qt-82bd909140fc2bd0dc53ff024bb72bd0a3b342e2.zip Qt-82bd909140fc2bd0dc53ff024bb72bd0a3b342e2.tar.gz Qt-82bd909140fc2bd0dc53ff024bb72bd0a3b342e2.tar.bz2 |
Fixed qdoc3 crash.
Fixes "Invalid read of size 4" reported by valgrind.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/node.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 4ba3a32..3c7e9dc 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -624,7 +624,7 @@ void InnerNode::removeChild(Node *child) QMap<QString, Node *>::Iterator prim = primaryFunctionMap.find(child->name()); NodeList& secs = secondaryFunctionMap[child->name()]; - if (*prim == child) { + if (prim != primaryFunctionMap.end() && *prim == child) { if (secs.isEmpty()) { primaryFunctionMap.remove(child->name()); } @@ -636,12 +636,12 @@ void InnerNode::removeChild(Node *child) secs.removeAll(child); } QMap<QString, Node *>::Iterator ent = childMap.find( child->name() ); - if ( *ent == child ) + if (ent != childMap.end() && *ent == child) childMap.erase( ent ); } else { QMap<QString, Node *>::Iterator ent = childMap.find(child->name()); - if (*ent == child) + if (ent != childMap.end() && *ent == child) childMap.erase(ent); } } |