aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/map.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/map.h b/common/map.h
index 5fd655093c..3a7c0786bd 100644
--- a/common/map.h
+++ b/common/map.h
@@ -156,7 +156,7 @@ public:
// Replace this node with node 'rep'
if (rep)
rep->_parent = parent;
- if (!parent) // Root node?
+ if (parent == _header) // Root node?
_root = rep;
else if (parent->_left == node)
parent->_left = rep;