Add nullptr check in scePthreadSetprio function (#1028)

This commit is contained in:
tGecko 2024-09-25 11:20:03 +02:00 committed by GitHub
parent b2de662d67
commit 1ec8f34a99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1506,6 +1506,10 @@ int PS4_SYSV_ABI scePthreadGetprio(ScePthread thread, int* prio) {
return ORBIS_OK;
}
int PS4_SYSV_ABI scePthreadSetprio(ScePthread thread, int prio) {
if (thread == nullptr) {
LOG_ERROR(Kernel_Pthread, "scePthreadSetprio: thread is nullptr");
return ORBIS_KERNEL_ERROR_EINVAL;
}
thread->prio = prio;
return ORBIS_OK;
}