# HG changeset patch # User alex # Date 1075061027 0 # Node ID 0bbdbc75532f67436b9db9b05e84522f6aabeb8c # Parent dcc8d9bb573923d57f4057c4a7fb3eb5f2e99d03 Don't mutex_unlock if it was never locked. Patch by Min Sik Kim diff -r dcc8d9bb5739 -r 0bbdbc75532f loader/win32.c --- a/loader/win32.c Sun Jan 25 19:19:30 2004 +0000 +++ b/loader/win32.c Sun Jan 25 20:03:47 2004 +0000 @@ -1374,8 +1374,11 @@ 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; }