Fix detection of blocking lock before viewport start.

This commit is contained in:
Bartosz Taudul 2017-10-05 23:40:08 +02:00
parent e572c655c1
commit 182f6533f3

View File

@ -1545,13 +1545,14 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
if( (*vbegin)->lockCount > 0 ) if( (*vbegin)->lockCount > 0 )
{ {
auto it = vbegin; auto it = vbegin;
bool waiting = (*vbegin)->waitCount > 0;
for(;;) for(;;)
{ {
if( (*it)->type == LockEvent::Type::Obtain ) if( (*it)->type == LockEvent::Type::Obtain )
{ {
if( (*it)->thread == tid ) if( (*it)->thread == tid )
{ {
state = (*it)->waitCount > 0 ? State::HasBlockingLock : State::HasLock; state = waiting ? State::HasBlockingLock : State::HasLock;
} }
break; break;
} }