mirror of
https://github.com/mpv-player/mpv
synced 2025-01-19 22:01:10 +00:00
Don't mutex_unlock if it was never locked. Patch by Min Sik Kim
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11853 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0daaf45c2c
commit
ca02bdcc20
@ -1374,8 +1374,11 @@ static void WINAPI expLeaveCriticalSection(CRITICAL_SECTION* c)
|
||||
printf("Win32 Warning: Leaving uninitialized Critical Section %p!!\n", c);
|
||||
return;
|
||||
}
|
||||
cs->locked=0;
|
||||
pthread_mutex_unlock(&(cs->mutex));
|
||||
if (cs->locked)
|
||||
{
|
||||
cs->locked=0;
|
||||
pthread_mutex_unlock(&(cs->mutex));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user