From 7166811387fb384450d30ce3e2b22d9621e11555 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 21 Nov 2024 17:49:54 -0800 Subject: [PATCH] Fix condition checking for erasing the root --- ConflictSet.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 0e9b68a..856c077 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -1885,10 +1885,9 @@ void downsize(Node *self, WriteContext *writeContext) { // Precondition: self is not the root. May invalidate nodes along the search // path to self. May invalidate children of self->parent. Returns a pointer to // the node after self. Precondition: `self->entryPresent` - Node *erase(Node *self, WriteContext *writeContext, bool logical) { ++writeContext->accum.entries_erased; - assert(self->parent != nullptr); + assert(self->parent->parent != nullptr); #if DEBUG_VERBOSE && !defined(NDEBUG) fprintf(stderr, "Erase: %s\n", getSearchPathPrintable(self).c_str());