diff --git a/tpie/btree/serialized_store.h b/tpie/btree/serialized_store.h index 20764ed47..11568b75c 100644 --- a/tpie/btree/serialized_store.h +++ b/tpie/btree/serialized_store.h @@ -398,8 +398,9 @@ class serialized_store { metadata_size = h.metadata_size; set_flags(h.flags); - - if (m_height == 1) { + if (m_height == 0) { + root_leaf = leaf_type(0); + } else if (m_height == 1) { root_leaf = leaf_type(h.root); f->seekg(h.root); unserialize(*f, *root_leaf);