From 720e5a046850a2a3df140325fc8eb632a0287897 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 20 Mar 2018 15:41:06 +0100 Subject: [PATCH] First check if valid, then search in map. --- server/TracyView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 28f49016..d3c2a50b 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1702,7 +1702,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos, for( const auto& v : m_worker.GetLockMap() ) { const auto& lockmap = v.second; - if( !Visible( &lockmap ) || !lockmap.valid ) continue; + if( !lockmap.valid || !Visible( &lockmap ) ) continue; auto it = lockmap.threadMap.find( tid ); if( it == lockmap.threadMap.end() ) continue;