Handle null event flags in cancel and clear (#3530)

This commit is contained in:
Marcin Mikołajczyk
2025-09-05 23:05:43 +02:00
committed by GitHub
parent ced900f98e
commit 53181b005c

View File

@@ -253,6 +253,9 @@ int PS4_SYSV_ABI sceKernelCloseEventFlag() {
int PS4_SYSV_ABI sceKernelClearEventFlag(OrbisKernelEventFlag ef, u64 bitPattern) {
LOG_DEBUG(Kernel_Event, "called");
if (ef == nullptr) {
return ORBIS_KERNEL_ERROR_ESRCH;
}
ef->Clear(bitPattern);
return ORBIS_OK;
}
@@ -260,6 +263,9 @@ int PS4_SYSV_ABI sceKernelClearEventFlag(OrbisKernelEventFlag ef, u64 bitPattern
int PS4_SYSV_ABI sceKernelCancelEventFlag(OrbisKernelEventFlag ef, u64 setPattern,
int* pNumWaitThreads) {
LOG_DEBUG(Kernel_Event, "called");
if (ef == nullptr) {
return ORBIS_KERNEL_ERROR_ESRCH;
}
ef->Cancel(setPattern, pNumWaitThreads);
return ORBIS_OK;
}