Skip to content

Commit

Permalink
Doesn't grab mutex in __PHYSFS_setError() if PHYSFS_init() hasn't bee…
Browse files Browse the repository at this point in the history
…n called.
  • Loading branch information
icculus committed Apr 8, 2002
1 parent 860e348 commit 7ffd15f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions physfs.c
Expand Up @@ -107,7 +107,9 @@ static ErrMsg *findErrorForCurrentThread(void)
ErrMsg *i;
PHYSFS_uint64 tid;

__PHYSFS_platformGrabMutex(errorLock);
if (initialized)
__PHYSFS_platformGrabMutex(errorLock);

if (errorMessages != NULL)
{
tid = __PHYSFS_platformGetThreadID();
Expand All @@ -121,7 +123,9 @@ static ErrMsg *findErrorForCurrentThread(void)
} /* if */
} /* for */
} /* if */
__PHYSFS_platformReleaseMutex(errorLock);

if (initialized)
__PHYSFS_platformReleaseMutex(errorLock);

return(NULL); /* no error available. */
} /* findErrorForCurrentThread */
Expand Down

0 comments on commit 7ffd15f

Please sign in to comment.