Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[test] lock mutex before calling wait
  • Loading branch information
Jalle19 committed May 13, 2014
1 parent 78788df commit 9e47737
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/pvr.tvh/src/AsyncState.cpp
Expand Up @@ -45,7 +45,10 @@ bool AsyncState::WaitForState(eAsyncState state, int timeoutMs /* = -1*/)
}

if (GetState() < state)
{
CLockObject lock(m_mutex);
m_condition.Wait(m_mutex, timeoutMs);
}

return GetState() >= state;
}

0 comments on commit 9e47737

Please sign in to comment.