mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-31 14:35:19 +00:00
fix conditional unsafety
This commit is contained in:
parent
4e54f054d6
commit
4a2cc38511
@ -428,10 +428,14 @@ int PS4_SYSV_ABI scePthreadMutexInit(ScePthreadMutex* mutex, const ScePthreadMut
|
||||
if (mutex == nullptr) {
|
||||
return SCE_KERNEL_ERROR_EINVAL;
|
||||
}
|
||||
if (mutex_attr == nullptr || *mutex_attr == nullptr) {
|
||||
if (mutex_attr == nullptr) {
|
||||
attr = g_pthread_cxt->getDefaultMutexattr();
|
||||
} else {
|
||||
attr = mutex_attr;
|
||||
if (*mutex_attr == nullptr) {
|
||||
attr = g_pthread_cxt->getDefaultMutexattr();
|
||||
} else {
|
||||
attr = *mutex_attr;
|
||||
}
|
||||
}
|
||||
|
||||
*mutex = new PthreadMutexInternal{};
|
||||
|
Loading…
Reference in New Issue
Block a user