mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 14:03:52 +00:00
Fix crash.
This commit is contained in:
parent
5bc145f719
commit
508b699252
@ -4207,7 +4207,9 @@ void View::DrawFindZone()
|
|||||||
draw->AddRectFilled( wpos, wpos + ImVec2( w, Height ), 0x22FFFFFF );
|
draw->AddRectFilled( wpos, wpos + ImVec2( w, Height ), 0x22FFFFFF );
|
||||||
draw->AddRect( wpos, wpos + ImVec2( w, Height ), 0x88FFFFFF );
|
draw->AddRect( wpos, wpos + ImVec2( w, Height ), 0x88FFFFFF );
|
||||||
|
|
||||||
const auto numBins = size_t( w - 4 );
|
const auto numBins = int64_t( w - 4 );
|
||||||
|
if( numBins > 1 )
|
||||||
|
{
|
||||||
auto bins = std::make_unique<uint64_t[]>( numBins );
|
auto bins = std::make_unique<uint64_t[]>( numBins );
|
||||||
memset( bins.get(), 0, sizeof( uint64_t ) * numBins );
|
memset( bins.get(), 0, sizeof( uint64_t ) * numBins );
|
||||||
|
|
||||||
@ -4218,7 +4220,7 @@ void View::DrawFindZone()
|
|||||||
for( auto& ev : v->timeline )
|
for( auto& ev : v->timeline )
|
||||||
{
|
{
|
||||||
const auto timeSpan = GetZoneEnd( *ev ) - ev->start;
|
const auto timeSpan = GetZoneEnd( *ev ) - ev->start;
|
||||||
const auto bin = std::min( numBins - 1, size_t( ( timeSpan - tmin ) * idt ) );
|
const auto bin = std::min( numBins - 1, int64_t( ( timeSpan - tmin ) * idt ) );
|
||||||
bins[bin]++;
|
bins[bin]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4239,6 +4241,7 @@ void View::DrawFindZone()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user