From 6d2f9428c5387abaae03478c9204d164a718ffe5 Mon Sep 17 00:00:00 2001
From: bunnei <bunneidev@gmail.com>
Date: Mon, 14 Dec 2020 17:57:40 -0800
Subject: [PATCH] core: kernel: Clear process list earlier.

---
 src/core/hle/kernel/kernel.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 1bf4c33557..b3661e4c17 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -76,6 +76,8 @@ struct KernelCore::Impl {
     }
 
     void Shutdown() {
+        process_list.clear();
+
         next_object_id = 0;
         next_kernel_process_id = Process::InitialKIPIDMin;
         next_user_process_id = Process::ProcessIDMin;
@@ -89,8 +91,6 @@ struct KernelCore::Impl {
 
         cores.clear();
 
-        process_list.clear();
-
         current_process = nullptr;
 
         system_resource_limit = nullptr;