فهرست منبع

hle: kernel: Ensure current running process is closed.

bunnei 5 سال پیش
والد
کامیت
854c7a3c28
1فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 6 5
      src/core/hle/kernel/kernel.cpp

+ 6 - 5
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();