mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
Add nullptr check in scePthreadSetprio function
This commit is contained in:
parent
fb5bc371cb
commit
d49b0ba4f2
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue