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.
This commit is contained in:
Stenzek 2023-02-04 18:34:36 +10:00 committed by refractionpcsx2
parent 1012dba8d7
commit 5c67438925
1 changed files with 1 additions and 1 deletions

View File

@ -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();