mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-19 07:16:21 +00:00
early return is mutex is null
This commit is contained in:
parent
35a9a74982
commit
9d7fe2c3f0
@ -277,6 +277,8 @@ void slock_free(slock_t *lock)
|
||||
**/
|
||||
void slock_lock(slock_t *lock)
|
||||
{
|
||||
if (!lock)
|
||||
return;
|
||||
#ifdef USE_WIN32_THREADS
|
||||
WaitForSingleObject(lock->lock, INFINITE);
|
||||
#else
|
||||
@ -292,6 +294,8 @@ void slock_lock(slock_t *lock)
|
||||
**/
|
||||
void slock_unlock(slock_t *lock)
|
||||
{
|
||||
if (!lock)
|
||||
return;
|
||||
#ifdef USE_WIN32_THREADS
|
||||
ReleaseMutex(lock->lock);
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user