diff --git a/rpcs3/Emu/Cell/lv2/sys_event.cpp b/rpcs3/Emu/Cell/lv2/sys_event.cpp index afc7fda33d..a3269e202d 100644 --- a/rpcs3/Emu/Cell/lv2/sys_event.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_event.cpp @@ -420,6 +420,11 @@ error_code sys_event_port_connect_ipc(ppu_thread& ppu, u32 eport_id, u64 ipc_key sys_event.warning("sys_event_port_connect_ipc(eport_id=0x%x, ipc_key=0x%x)", eport_id, ipc_key); + if (ipc_key == 0) + { + return CELL_EINVAL; + } + auto queue = lv2_event_queue::find(ipc_key); std::lock_guard lock(id_manager::g_mutex); diff --git a/rpcs3/Emu/Cell/lv2/sys_sync.h b/rpcs3/Emu/Cell/lv2/sys_sync.h index 53c47b08f4..b9d1b32335 100644 --- a/rpcs3/Emu/Cell/lv2/sys_sync.h +++ b/rpcs3/Emu/Cell/lv2/sys_sync.h @@ -162,6 +162,11 @@ public: { case SYS_SYNC_PROCESS_SHARED: { + if (ipc_key == 0) + { + return CELL_EINVAL; + } + switch (flags) { case SYS_SYNC_NEWLY_CREATED: