From 12e2a59565520382e76c641896b594fdafebd244 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 6 Jun 2014 17:57:52 -0400 Subject: Thread: Updated VerifyWait to be more readable (but functionally the same). --- src/core/hle/kernel/thread.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/core/hle/kernel') diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 700f4ea7c..0385a64fd 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -146,12 +146,11 @@ void ChangeReadyState(Thread* t, bool ready) { inline bool VerifyWait(const Handle& thread, WaitType type, Handle handle) { Handle wait_id = 0; Thread *t = g_object_pool.GetFast(thread); - if (t) { - if (type == t->wait_type && handle == t->wait_handle) { - return true; - } + if (t != nullptr && type == t->wait_type && handle == t->wait_handle) { + return true; } else { ERROR_LOG(KERNEL, "thread 0x%08X does not exist", thread); + return false; } return false; } -- cgit v1.2.3