fixed possible nullptr crash on rwlock create
This commit is contained in:
parent
81a1cbf6b1
commit
3318f12639
|
@ -201,7 +201,9 @@ int PS4_SYSV_ABI scePthreadRwlockInit(OrbisPthreadRwlock* rwlock,
|
|||
if (attr == nullptr || *attr == nullptr) {
|
||||
attr = g_pthread_cxt->getDefaultRwattr();
|
||||
}
|
||||
if (name != nullptr) {
|
||||
(*rwlock)->name = name;
|
||||
}
|
||||
int result = pthread_rwlock_init(&(*rwlock)->pth_rwlock, &(*attr)->attr_rwlock);
|
||||
if (result != 0) {
|
||||
LOG_ERROR(Kernel_Pthread, "scePthreadRwlockInit: error = {}", result);
|
||||
|
|
Loading…
Reference in New Issue