Have to special-case the root node.

This commit is contained in:
JoelKatz
2012-12-14 12:07:50 -08:00
parent efd9e91c51
commit 534ce8307f

View File

@@ -726,7 +726,9 @@ SHAMapTreeNode::pointer SHAMap::fetchNodeExternal(const SHAMapNode& id, const ui
assert(false);
return SHAMapTreeNode::pointer();
}
if (!mTNByID.insert(std::make_pair(id, ret)).second)
if (id.isRoot())
mTNByID[id] = ret;
else if (!mTNByID.insert(std::make_pair(id, ret)).second)
assert(false);
trackNewNode(ret);
return ret;