Core/Bitset: Fix crash when resizing to zero

This commit is contained in:
Jérôme Leclercq 2020-08-27 19:25:43 +02:00
parent a28635ec70
commit 9d16559f55
1 changed files with 2 additions and 1 deletions

View File

@ -1219,7 +1219,8 @@ namespace Nz
template<typename Block, class Allocator>
void Bitset<Block, Allocator>::ResetExtraBits()
{
m_blocks.back() &= GetLastBlockMask();
if (!m_blocks.empty())
m_blocks.back() &= GetLastBlockMask();
}
/*!