From 52caa57f6f67a5cfb3e75785cb55b4df549c327b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gr=C3=A9goire?= Date: Sun, 13 Apr 2025 18:24:40 +0200 Subject: [PATCH] Fix switched-in thread lookup (End() can be invalid) --- profiler/src/profiler/TracyView_CpuData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyView_CpuData.cpp b/profiler/src/profiler/TracyView_CpuData.cpp index 91f77eb4..e89faf04 100644 --- a/profiler/src/profiler/TracyView_CpuData.cpp +++ b/profiler/src/profiler/TracyView_CpuData.cpp @@ -338,7 +338,7 @@ bool View::DrawCpuData( const TimelineContext& ctx, const std::vectorv; - 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() );