mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Fix crash when zone exists before thread context switches appear.
This commit is contained in:
parent
b322d20c19
commit
350e526ec0
@ -4704,7 +4704,7 @@ void View::DrawZoneInfoWindow()
|
|||||||
TextFocused( "Running state regions:", "1" );
|
TextFocused( "Running state regions:", "1" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if( cnt > 1 )
|
||||||
{
|
{
|
||||||
if( incomplete )
|
if( incomplete )
|
||||||
{
|
{
|
||||||
@ -11712,6 +11712,7 @@ bool View::GetZoneRunningTime( const ContextSwitch* ctx, const ZoneEvent& ev, in
|
|||||||
const auto eit = std::upper_bound( it, ctx->v.end(), end, [] ( const auto& l, const auto& r ) { return l < r.start; } );
|
const auto eit = std::upper_bound( it, ctx->v.end(), end, [] ( const auto& l, const auto& r ) { return l < r.start; } );
|
||||||
if( eit == ctx->v.end() ) return false;
|
if( eit == ctx->v.end() ) return false;
|
||||||
cnt = std::distance( it, eit );
|
cnt = std::distance( it, eit );
|
||||||
|
if( cnt == 0 ) return false;
|
||||||
if( cnt == 1 )
|
if( cnt == 1 )
|
||||||
{
|
{
|
||||||
time = end - ev.start;
|
time = end - ev.start;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user