diff --git a/src/util/trie.h b/src/util/trie.h index 9ed877020..c0d2d1519 100644 --- a/src/util/trie.h +++ b/src/util/trie.h @@ -139,8 +139,10 @@ public: template void for_each(F && f) const { - buffer prefix; - for_each(f, *this, prefix); + if (m_ptr) { + buffer prefix; + for_each(f, *this, prefix); + } } // for debugging purposes