From 08096a501571f3ad7251ef98fe70030c12f15ecd Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Mon, 29 Dec 2014 18:34:01 -0200 Subject: [PATCH] Thread: Fix nullptr access in a logging function --- src/core/hle/kernel/thread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 658b984e3..e0071b76d 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -382,7 +382,8 @@ void Reschedule() { for (auto& thread : thread_list) { LOG_TRACE(Kernel, "\thandle=0x%08X prio=0x%02X, status=0x%08X wait_type=0x%08X wait_handle=0x%08X", - thread->GetHandle(), thread->current_priority, thread->status, thread->wait_type, thread->wait_object->GetHandle()); + thread->GetHandle(), thread->current_priority, thread->status, thread->wait_type, + (thread->wait_object ? thread->wait_object->GetHandle() : INVALID_HANDLE)); } }