mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Don't try to read empty timelines.
This commit is contained in:
parent
25116a8059
commit
d84d0b7754
@ -470,13 +470,16 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
f.Read( td->count );
|
f.Read( td->count );
|
||||||
uint64_t tsz;
|
uint64_t tsz;
|
||||||
f.Read( tsz );
|
f.Read( tsz );
|
||||||
if( fileVer <= FileVersion( 0, 3, 2 ) )
|
if( tsz != 0 )
|
||||||
{
|
{
|
||||||
ReadTimelinePre033( f, td->timeline, CompressThread( tid ), tsz, fileVer );
|
if( fileVer <= FileVersion( 0, 3, 2 ) )
|
||||||
}
|
{
|
||||||
else
|
ReadTimelinePre033( f, td->timeline, CompressThread( tid ), tsz, fileVer );
|
||||||
{
|
}
|
||||||
ReadTimeline( f, td->timeline, CompressThread( tid ), tsz );
|
else
|
||||||
|
{
|
||||||
|
ReadTimeline( f, td->timeline, CompressThread( tid ), tsz );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
uint64_t msz;
|
uint64_t msz;
|
||||||
f.Read( msz );
|
f.Read( msz );
|
||||||
@ -528,14 +531,20 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
ctx->period = 1.f;
|
ctx->period = 1.f;
|
||||||
uint64_t tsz;
|
uint64_t tsz;
|
||||||
f.Read( tsz );
|
f.Read( tsz );
|
||||||
ReadTimelinePre032( f, ctx->timeline, tsz );
|
if( tsz != 0 )
|
||||||
|
{
|
||||||
|
ReadTimelinePre032( f, ctx->timeline, tsz );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
f.Read( ctx->period );
|
f.Read( ctx->period );
|
||||||
uint64_t tsz;
|
uint64_t tsz;
|
||||||
f.Read( tsz );
|
f.Read( tsz );
|
||||||
ReadTimeline( f, ctx->timeline, tsz );
|
if( tsz != 0 )
|
||||||
|
{
|
||||||
|
ReadTimeline( f, ctx->timeline, tsz );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_data.gpuData.push_back_no_space_check( ctx );
|
m_data.gpuData.push_back_no_space_check( ctx );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user