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 fc231438b2
commit 704dd0617f

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;
}