From 9dd1d6a744557448b063ff8e502b4c3d6047bcfa Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 17 Feb 2019 17:13:20 +0100 Subject: [PATCH] Don't display locks with no lock events. --- server/TracyView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 01d948ff..47022fbf 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4934,7 +4934,7 @@ void View::DrawOptions() for( const auto& l : m_worker.GetLockMap() ) { - if( l.second.valid && l.second.threadList.size() != 1 ) + if( l.second.valid && !l.second.timeline.empty() && l.second.threadList.size() != 1 ) { auto& sl = m_worker.GetSourceLocation( l.second.srcloc ); auto fileName = m_worker.GetString( sl.file ); @@ -4997,7 +4997,7 @@ void View::DrawOptions() for( const auto& l : m_worker.GetLockMap() ) { - if( l.second.valid && l.second.threadList.size() == 1 ) + if( l.second.valid && !l.second.timeline.empty() && l.second.threadList.size() == 1 ) { auto& sl = m_worker.GetSourceLocation( l.second.srcloc ); auto fileName = m_worker.GetString( sl.file );