mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-17 22:35:36 +00:00
Fix switched-in thread lookup (End() can be invalid)
This commit is contained in:
@@ -338,7 +338,7 @@ bool View::DrawCpuData( const TimelineContext& ctx, const std::vector<CpuUsageDr
|
||||
if( threadCtxSwitches )
|
||||
{
|
||||
auto& v = threadCtxSwitches->v;
|
||||
auto it = std::lower_bound( v.begin(), v.end(), ev.Start(), [](const auto& l, const auto& r) { return l.End() < r; } );
|
||||
auto it = std::lower_bound( v.begin(), v.end(), ev.Start(), [](const auto& l, const auto& r) { return l.Start() < r; } );
|
||||
// We should have the data, or something went wrong.
|
||||
assert( it != v.end() && it->Start() == ev.Start() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user