diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index ebe308a93..baa9687cb 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -143,16 +143,14 @@ void ChangeReadyState(Thread* t, bool ready) { | |||
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | /// Verify that a thread has not been released from waiting | 145 | /// Verify that a thread has not been released from waiting |
| 146 | inline bool VerifyWait(const Handle& thread, WaitType type, Handle handle) { | 146 | inline bool VerifyWait(const Handle& handle, WaitType type, Handle wait_handle) { |
| 147 | Handle wait_id = 0; | 147 | Thread* thread = g_object_pool.GetFast<Thread>(handle); |
| 148 | Thread* t = g_object_pool.GetFast<Thread>(thread); | 148 | _assert_msg_(KERNEL, (thread != nullptr), "called, but thread is nullptr!"); |
| 149 | if (t != nullptr && type == t->wait_type && handle == t->wait_handle) { | 149 | |
| 150 | return true; | 150 | if (type != thread->wait_type || wait_handle != thread->wait_handle) |
| 151 | } else { | ||
| 152 | ERROR_LOG(KERNEL, "thread 0x%08X does not exist", thread); | ||
| 153 | return false; | 151 | return false; |
| 154 | } | 152 | |
| 155 | return false; | 153 | return true; |
| 156 | } | 154 | } |
| 157 | 155 | ||
| 158 | /// Stops the current thread | 156 | /// Stops the current thread |