From 958e4727517812aecf3f99af396b27dbce3d77ba Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 28 Oct 2017 15:24:25 +0200 Subject: [PATCH] Better lock combining. --- server/TracyView.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 926c9b51..7f764992 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2355,7 +2355,11 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos, { n = GetNextLockEvent( n, vend, ns, ns, thread ); } - if( n == next ) break; + if( n >= vend ) break; + if( n == next ) + { + n = GetNextLockEvent( n, vend, ns, ns, thread ); + } const auto t2 = n == tl.end() ? GetLastTime() : (*n)->time; const auto px2 = ( t2 - m_zvStart ) * pxns; if( px2 - px0 > MinVisSize ) break;