Don't crash when accessing statistics of empty item repository
To do that, we need to really distinguish between a fully empty item repository and one that is at least partially initialized. Most notably, truly empty means we really never have accessed any buckets and as such various lazy structures are not initialized yet, such as the m_freeSpaceBuckets. In real-world usage this change has no impact, as we will still lazily grow the item repository when we call allocateNextBuckets, either from `load` (via ItemRepositoryRegistry::registerRepository) or when we call `index` and `useBucket >= m_buckets.size()`.
parent
491d6f50
Please register or sign in to comment