mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Don't memcpy to nullptr.
This commit is contained in:
parent
c8ff8540f9
commit
ba9b35dc3b
@ -27,12 +27,15 @@ void ThreadCompress::Load( FileRead& f, int fileVer )
|
|||||||
if( fileVer >= FileVersion( 0, 4, 4 ) )
|
if( fileVer >= FileVersion( 0, 4, 4 ) )
|
||||||
{
|
{
|
||||||
f.Read( sz );
|
f.Read( sz );
|
||||||
m_threadExpand.reserve_and_use( sz );
|
if( sz != 0 )
|
||||||
f.Read( m_threadExpand.data(), sizeof( uint64_t ) * sz );
|
|
||||||
m_threadMap.reserve( sz );
|
|
||||||
for( size_t i=0; i<sz; i++ )
|
|
||||||
{
|
{
|
||||||
m_threadMap.emplace( m_threadExpand[i], i );
|
m_threadExpand.reserve_and_use( sz );
|
||||||
|
f.Read( m_threadExpand.data(), sizeof( uint64_t ) * sz );
|
||||||
|
m_threadMap.reserve( sz );
|
||||||
|
for( size_t i=0; i<sz; i++ )
|
||||||
|
{
|
||||||
|
m_threadMap.emplace( m_threadExpand[i], i );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user