From f5d39ef7f23d490e288a657fb3848e4791a86b9d Mon Sep 17 00:00:00 2001 From: Eladash <18193363+elad335@users.noreply.github.com> Date: Sun, 31 Dec 2023 20:46:30 +0200 Subject: [PATCH] Fix a corner case in lv2_timer_thread abort --- rpcs3/Emu/Cell/lv2/sys_timer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpcs3/Emu/Cell/lv2/sys_timer.cpp b/rpcs3/Emu/Cell/lv2/sys_timer.cpp index 1dc245da3a..4ebabcc245 100644 --- a/rpcs3/Emu/Cell/lv2/sys_timer.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_timer.cpp @@ -149,6 +149,11 @@ void lv2_timer_thread::operator()() { while (lv2_obj::check(timer)) { + if (thread_ctrl::state() == thread_state::aborting) + { + break; + } + if (const u64 advised_sleep_time = timer->check(_now)) { if (sleep_time > advised_sleep_time)