summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-01-19 02:56:08 +0100
committerbunnei <bunneidev@gmail.com>2022-01-21 02:08:00 +0100
commit91ff6d4cb3aa4010e5856993c9291627c5c38f99 (patch)
tree5f24fa4d8db6546e255684b8c4b4ee4bd9659f6f /src/core/hle
parenthle: kernel: KThread: Decrease DummyThread priority to ensure it is never scheduled. (diff)
downloadyuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.tar
yuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.tar.gz
yuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.tar.bz2
yuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.tar.lz
yuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.tar.xz
yuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.tar.zst
yuzu-91ff6d4cb3aa4010e5856993c9291627c5c38f99.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/k_thread.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index a599723e6..4cbf12c11 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -1097,14 +1097,14 @@ void KThread::EndWait(ResultCode wait_result_) {
// Lock the scheduler.
KScopedSchedulerLock sl(kernel);
- // Dummy threads are just used by host threads for locking, and will never have a wait_queue.
- if (thread_type == ThreadType::Dummy) {
- ASSERT_MSG(false, "Dummy threads should never call EndWait!");
- return;
- }
-
// If we're waiting, notify our queue that we're available.
if (GetState() == ThreadState::Waiting) {
+ if (wait_queue == nullptr) {
+ // This should never happen, but avoid a hard crash below to get this logged.
+ ASSERT_MSG(false, "wait_queue is nullptr!");
+ return;
+ }
+
wait_queue->EndWait(this, wait_result_);
}
}