Skip to content
Permalink
Browse files
Check for mutex bugs.
  • Loading branch information
icculus committed Mar 20, 2012
1 parent e34e67f commit f5923f5ceafc627b8b457ead70d8ac296208bf76
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/platform_posix.c
@@ -444,6 +444,8 @@ int __PHYSFS_platformGrabMutex(void *mutex)
void __PHYSFS_platformReleaseMutex(void *mutex)
{
PthreadMutex *m = (PthreadMutex *) mutex;
assert(m->owner == pthread_self()); /* catch programming errors. */
assert(m->count > 0); /* catch programming errors. */
if (m->owner == pthread_self())
{
if (--m->count == 0)

0 comments on commit f5923f5

Please sign in to comment.