Explorar o código

hle: kernel: time_manager: Avoid a crash on process exit.

bunnei %!s(int64=5) %!d(string=hai) anos
pai
achega
c0870315fd
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/core/hle/kernel/time_manager.cpp

+ 4 - 1
src/core/hle/kernel/time_manager.cpp

@@ -24,7 +24,10 @@ TimeManager::TimeManager(Core::System& system_) : system{system_} {
                 return;
             }
             auto thread = this->system.Kernel().RetrieveThreadFromGlobalHandleTable(proper_handle);
-            thread->OnWakeUp();
+            if (thread) {
+                // Thread can be null if process has exited
+                thread->OnWakeUp();
+            }
         });
 }