From 34030bf3d4c3cb101aad897f99356289c171e56d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 6 Oct 2017 18:52:52 +0200 Subject: [PATCH] Prevent crash when no locks to display. --- server/TracyView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index ebd6c2e3..66135601 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1531,6 +1531,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos, if( lockmap.threads.find( tid ) == lockmap.threads.end() ) continue; auto& tl = lockmap.timeline; assert( !tl.empty() ); + if( tl.back()->time < m_zvStart ) continue; auto vbegin = std::lower_bound( tl.begin(), tl.end(), m_zvStart - m_delay, [] ( const auto& l, const auto& r ) { return l->time < r; } ); const auto vend = std::lower_bound( tl.begin(), tl.end(), m_zvEnd + m_resolution, [] ( const auto& l, const auto& r ) { return l->time < r; } );