summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-06-06 23:57:52 +0200
committerbunnei <ericbunnie@gmail.com>2014-06-13 15:51:14 +0200
commit12e2a59565520382e76c641896b594fdafebd244 (patch)
tree8e10228fa547486573b717bc25e77d47762dd766
parentSVC: Moved declaration of "wait" variable in SendSyncRequest for improved readability. (diff)
downloadyuzu-12e2a59565520382e76c641896b594fdafebd244.tar
yuzu-12e2a59565520382e76c641896b594fdafebd244.tar.gz
yuzu-12e2a59565520382e76c641896b594fdafebd244.tar.bz2
yuzu-12e2a59565520382e76c641896b594fdafebd244.tar.lz
yuzu-12e2a59565520382e76c641896b594fdafebd244.tar.xz
yuzu-12e2a59565520382e76c641896b594fdafebd244.tar.zst
yuzu-12e2a59565520382e76c641896b594fdafebd244.zip
-rw-r--r--src/core/hle/kernel/thread.cpp7
1 files changed, 3 insertions, 4 deletions
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>(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;
}