Fix memcpy from nullptr.

This commit is contained in:
Bartosz Taudul 2019-12-19 17:30:37 +01:00
parent ef9bcb6696
commit f7f0ec0cec
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ void ThreadCompress::Save( FileWrite& f ) const
{
uint64_t sz = m_threadExpand.size();
f.Write( &sz, sizeof( sz ) );
f.Write( m_threadExpand.data(), sz * sizeof( uint64_t ) );
if( sz != 0 ) f.Write( m_threadExpand.data(), sz * sizeof( uint64_t ) );
}
uint16_t ThreadCompress::CompressThreadReal( uint64_t thread )

View File

@ -5647,7 +5647,7 @@ void Worker::Write( FileWrite& f )
sz = m_data.appInfo.size();
f.Write( &sz, sizeof( sz ) );
f.Write( m_data.appInfo.data(), sizeof( m_data.appInfo[0] ) * sz );
if( sz != 0 ) f.Write( m_data.appInfo.data(), sizeof( m_data.appInfo[0] ) * sz );
sz = m_data.frameImage.size();
f.Write( &sz, sizeof( sz ) );