Doesn't grab mutex in __PHYSFS_setError() if PHYSFS_init() hasn't been called.
This commit is contained in:
parent
860e348dac
commit
7ffd15fb42
8
physfs.c
8
physfs.c
|
@ -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();
|
||||
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue