From c0870315fd89dfeabdbe5833d52e753a5d8417ea Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 13 Nov 2020 22:49:33 -0800 Subject: hle: kernel: time_manager: Avoid a crash on process exit. --- src/core/hle/kernel/time_manager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/hle/kernel/time_manager.cpp b/src/core/hle/kernel/time_manager.cpp index 95f2446c9..ea9089ff8 100644 --- a/src/core/hle/kernel/time_manager.cpp +++ b/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(); + } }); } -- cgit v1.2.3