From d7363322c79d6e7598e0d80cf1af9c05b652cecb Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 6 Jun 2014 00:19:40 -0400 Subject: HLE: Updated various handle debug assertions to be more clear. --- src/core/hle/kernel/mutex.cpp | 2 +- src/core/hle/kernel/thread.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle/kernel') diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index eee7c4935..ee7507edf 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -122,7 +122,7 @@ bool ReleaseMutex(Mutex* mutex) { Result ReleaseMutex(Handle handle) { Mutex* mutex = Kernel::g_object_pool.GetFast(handle); - _assert_msg_(KERNEL, mutex, "ReleaseMutex tried to release a NULL mutex!"); + _assert_msg_(KERNEL, (mutex != NULL), "ReleaseMutex tried to release a NULL mutex!"); if (!ReleaseMutex(mutex)) { return -1; diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index da93e006c..5fdb4fbe6 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -353,7 +353,7 @@ Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s3 /// Get the priority of the thread specified by handle u32 GetThreadPriority(const Handle handle) { Thread* thread = g_object_pool.GetFast(handle); - _assert_msg_(KERNEL, thread, "called, but thread is NULL!"); + _assert_msg_(KERNEL, (thread != NULL), "called, but thread is NULL!"); return thread->current_priority; } @@ -365,7 +365,7 @@ Result SetThreadPriority(Handle handle, s32 priority) { } else { thread = g_object_pool.GetFast(handle); } - _assert_msg_(KERNEL, thread, "called, but thread is NULL!"); + _assert_msg_(KERNEL, (thread != NULL), "called, but thread is NULL!"); // If priority is invalid, clamp to valid range if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { -- cgit v1.2.3