1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Fix crash.

This commit is contained in:
Bartosz Taudul 2021-09-27 18:13:45 +02:00
parent 8eb038280f
commit 9cb54982cb
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -3064,7 +3064,14 @@ void View::DrawZones()
{
// FIXME
t0 = std::min( t0, _t0 );
t1 = std::max( t1, std::min( m_worker.GetLastTime(), m_worker.GetZoneEnd( *td.second.timeline.back() ) ) );
if( td.second.timeline.is_magic() )
{
t1 = std::max( t1, std::min( m_worker.GetLastTime(), m_worker.GetZoneEnd( ((Vector<GpuEvent>*)&td.second.timeline)->back() ) ) );
}
else
{
t1 = std::max( t1, std::min( m_worker.GetLastTime(), m_worker.GetZoneEnd( *td.second.timeline.back() ) ) );
}
}
}
if( t0 < t1 )