Fix assertion poolIndex < count_ after JsonDocument::clear()

Fixes #2034
This commit is contained in:
Benoit Blanchon committed 2024-01-16 10:10:43 +01:00
1 parent 94783fdd2a
commit 1b143d383b
4 files changed
+54

No files matched your search

@@ -103,6 +103,7 @@ class VariantPoolList {
for (PoolCount i = 0; i < count_; i++)
pools_[i].destroy(allocator);
count_ = 0;
freeList_ = NULL_SLOT;
if (pools_ != preallocatedPools_) {
allocator->deallocate(pools_);
pools_ = preallocatedPools_;