diff --git a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp index c6c120696c..467ce9c2d1 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp @@ -22,7 +22,7 @@ struct ppu_thread_cleaner { if (u32 id = old_id.exchange(new_id)) [[likely]] { - if (!idm::remove>(old_id)) [[unlikely]] + if (!idm::remove>(id)) [[unlikely]] { sys_ppu_thread.fatal("Failed to remove detached thread 0x%x", id); }