diff options
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 11 |
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 | ||