From 6a78be5930fd5eabbea740a5cf17efa5a7f1bc98 Mon Sep 17 00:00:00 2001
From: bunnei <ericbunnie@gmail.com>
Date: Wed, 21 May 2014 21:42:18 -0400
Subject: [PATCH] thread: fixed bug where result of __NextThread was not being
 properly checked when NULL

---
 src/core/hle/kernel/thread.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 294e03ca62..ef705e327d 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -194,7 +194,7 @@ Thread* __NextThread() {
     } else  {
         next = g_thread_ready_queue.pop_first();
     }
-    if (next < 0) {
+    if (next == 0) {
         return NULL;
     }
     return Kernel::g_object_pool.GetFast<Thread>(next);
-- 
GitLab