From 5c674389252c826318c45bd5be7bafe1d1e6243e Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 4 Feb 2023 18:34:36 +1000 Subject: [PATCH] VMManager: Only exit CPU execution if we were running Fixes crash if you were paused when you shut down the VM with the EE interpreter enabled. --- pcsx2/VMManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/VMManager.cpp b/pcsx2/VMManager.cpp index 5266d4331c..da7ed12876 100644 --- a/pcsx2/VMManager.cpp +++ b/pcsx2/VMManager.cpp @@ -209,7 +209,7 @@ void VMManager::SetState(VMState state) else Host::OnVMResumed(); } - else if (state == VMState::Stopping) + else if (state == VMState::Stopping && old_state == VMState::Running) { // If stopping, break execution as soon as possible. Cpu->ExitExecution();