summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2021-07-01 21:50:42 -0700
committerGravatar bunnei2021-07-20 18:54:56 -0700
commit854c7a3c2826b769d9d41c79570c4dae57e0b3eb (patch)
treecf1c762ca93572136a44e63b572fe4db817ad212 /src/core/hle/kernel/kernel.cpp
parenthle: kernel: Ensure global handle table is finalized before closing. (diff)
downloadyuzu-854c7a3c2826b769d9d41c79570c4dae57e0b3eb.tar.gz
yuzu-854c7a3c2826b769d9d41c79570c4dae57e0b3eb.tar.xz
yuzu-854c7a3c2826b769d9d41c79570c4dae57e0b3eb.zip
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 b7f9eb5c1..2d5525839 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -91,6 +91,12 @@ struct KernelCore::Impl {
91 } 91 }
92 92
93 void Shutdown() { 93 void Shutdown() {
94 if (current_process) {
95 current_process->Finalize();
96 current_process->Close();
97 current_process = nullptr;
98 }
99
94 process_list.clear(); 100 process_list.clear();
95 101
96 // Ensures all service threads gracefully shutdown 102 // Ensures all service threads gracefully shutdown
@@ -112,11 +118,6 @@ struct KernelCore::Impl {
112 118
113 cores.clear(); 119 cores.clear();
114 120
115 if (current_process) {
116 current_process->Close();
117 current_process = nullptr;
118 }
119
120 global_handle_table->Finalize(); 121 global_handle_table->Finalize();
121 global_handle_table.reset(); 122 global_handle_table.reset();
122 123