diff --git a/src/core/libraries/kernel/threads/pthread.cpp b/src/core/libraries/kernel/threads/pthread.cpp index e81207a0..639ed161 100644 --- a/src/core/libraries/kernel/threads/pthread.cpp +++ b/src/core/libraries/kernel/threads/pthread.cpp @@ -386,6 +386,9 @@ int PS4_SYSV_ABI posix_sched_get_priority_min() { } int PS4_SYSV_ABI posix_pthread_rename_np(PthreadT thread, const char* name) { + if (thread == nullptr) { + return POSIX_EINVAL; + } LOG_INFO(Kernel_Pthread, "name = {}", name); Common::SetThreadName(reinterpret_cast(thread->native_thr.GetHandle()), name); thread->name = name;