Don't display locks with no lock events.

This commit is contained in:
Bartosz Taudul 2019-02-17 17:13:20 +01:00
parent 062058315e
commit 9dd1d6a744

View File

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