First check if valid, then search in map.

This commit is contained in:
Bartosz Taudul 2018-03-20 15:41:06 +01:00
parent fe6c753f12
commit 720e5a0468

View File

@ -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;