summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3/node.cpp')
-rw-r--r--tools/qdoc3/node.cpp6
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);
}
}