aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-07-01 21:50:42 -0700
committerbunnei <bunneidev@gmail.com>2021-07-20 18:54:56 -0700
commit854c7a3c2826b769d9d41c79570c4dae57e0b3eb (patch)
treecf1c762ca93572136a44e63b572fe4db817ad212 /src/core/hle/kernel/kernel.cpp
parentecf36534446df97bbe18042a098f25069dfd8648 (diff)
hle: kernel: Ensure current running process is closed.
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index b7f9eb5c1d..2d5525839b 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -91,6 +91,12 @@ struct KernelCore::Impl {
}
void Shutdown() {
+ if (current_process) {
+ current_process->Finalize();
+ current_process->Close();
+ current_process = nullptr;
+ }
+
process_list.clear();
// Ensures all service threads gracefully shutdown
@@ -112,11 +118,6 @@ struct KernelCore::Impl {
cores.clear();
- if (current_process) {
- current_process->Close();
- current_process = nullptr;
- }
-
global_handle_table->Finalize();
global_handle_table.reset();