summaryrefslogtreecommitdiff
path: root/src/base/trie.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/trie.hh')
-rw-r--r--src/base/trie.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/base/trie.hh b/src/base/trie.hh
index e6b2881ab..1d110b4e1 100644
--- a/src/base/trie.hh
+++ b/src/base/trie.hh
@@ -185,6 +185,10 @@ class Trie
Handle
insert(Key key, unsigned width, Value *val)
{
+ // We use NULL value pointers to mark internal nodes of the trie, so
+ // we don't allow inserting them as real values.
+ assert(val);
+
// Build a mask which masks off all the bits we don't care about.
Key new_mask = ~(Key)0;
if (width < MaxBits)