Handle null event flags in cancel and clear (#3530)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions

This commit is contained in:
Marcin Mikołajczyk 2025-09-05 23:05:43 +02:00 committed by GitHub
parent ced900f98e
commit 53181b005c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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