Don't memcpy to nullptr.

This commit is contained in:
Bartosz Taudul 2020-05-14 17:38:48 +02:00
parent c8ff8540f9
commit ba9b35dc3b

View File

@ -27,6 +27,8 @@ void ThreadCompress::Load( FileRead& f, int fileVer )
if( fileVer >= FileVersion( 0, 4, 4 ) )
{
f.Read( sz );
if( sz != 0 )
{
m_threadExpand.reserve_and_use( sz );
f.Read( m_threadExpand.data(), sizeof( uint64_t ) * sz );
m_threadMap.reserve( sz );
@ -35,6 +37,7 @@ void ThreadCompress::Load( FileRead& f, int fileVer )
m_threadMap.emplace( m_threadExpand[i], i );
}
}
}
else
{
f.Read( sz );