Add nullptr check in scePthreadSetprio function

This commit is contained in:
tGecko 2024-09-22 22:09:53 +02:00
parent fb5bc371cb
commit d49b0ba4f2

View file

@ -1512,6 +1512,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;
}