summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/scheduler.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-07 19:16:25 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 17:35:58 +0200
commit5974e3ea33e12e7abd813704e5b895003ba83555 (patch)
treea72710344f6436cf5bd91eab3424b89188123285 /src/core/hle/kernel/scheduler.cpp
parentGeneral: Move ARM_Interface into Threads. (diff)
downloadyuzu-5974e3ea33e12e7abd813704e5b895003ba83555.tar
yuzu-5974e3ea33e12e7abd813704e5b895003ba83555.tar.gz
yuzu-5974e3ea33e12e7abd813704e5b895003ba83555.tar.bz2
yuzu-5974e3ea33e12e7abd813704e5b895003ba83555.tar.lz
yuzu-5974e3ea33e12e7abd813704e5b895003ba83555.tar.xz
yuzu-5974e3ea33e12e7abd813704e5b895003ba83555.tar.zst
yuzu-5974e3ea33e12e7abd813704e5b895003ba83555.zip
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
-rw-r--r--src/core/hle/kernel/scheduler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp
index a5083ae7c..ce7e1986d 100644
--- a/src/core/hle/kernel/scheduler.cpp
+++ b/src/core/hle/kernel/scheduler.cpp
@@ -724,7 +724,7 @@ void Scheduler::SwitchContext() {
previous_thread->SetContinuousOnSVC(false);
previous_thread->last_running_ticks = system.CoreTiming().GetCPUTicks();
previous_thread->SetIsRunning(false);
- if (!previous_thread->IsHLEThread()) {
+ if (!previous_thread->IsHLEThread() && !previous_thread->HasExited()) {
Core::ARM_Interface& cpu_core = previous_thread->ArmInterface();
cpu_core.SaveContext(previous_thread->GetContext32());
cpu_core.SaveContext(previous_thread->GetContext64());