summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_thread_queue.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-03-08 02:48:46 +0100
committerLiam <byteslice@airmail.cc>2023-03-08 02:51:29 +0100
commit1776448df2a023f6735b69e27b72664e02f448ee (patch)
tree51af858c5e60d432db36d876f1d791aded1115c9 /src/core/hle/kernel/k_thread_queue.cpp
parentMerge pull request #9889 from Morph1984/time-is-ticking (diff)
downloadyuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.gz
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.bz2
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.lz
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.xz
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.zst
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.zip
Diffstat (limited to 'src/core/hle/kernel/k_thread_queue.cpp')
-rw-r--r--src/core/hle/kernel/k_thread_queue.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_thread_queue.cpp b/src/core/hle/kernel/k_thread_queue.cpp
index 5f1dc97eb..fe648447b 100644
--- a/src/core/hle/kernel/k_thread_queue.cpp
+++ b/src/core/hle/kernel/k_thread_queue.cpp
@@ -22,7 +22,9 @@ void KThreadQueue::EndWait(KThread* waiting_thread, Result wait_result) {
waiting_thread->ClearWaitQueue();
// Cancel the thread task.
- kernel.HardwareTimer().CancelTask(waiting_thread);
+ if (m_hardware_timer != nullptr) {
+ m_hardware_timer->CancelTask(waiting_thread);
+ }
}
void KThreadQueue::CancelWait(KThread* waiting_thread, Result wait_result, bool cancel_timer_task) {
@@ -36,8 +38,8 @@ void KThreadQueue::CancelWait(KThread* waiting_thread, Result wait_result, bool
waiting_thread->ClearWaitQueue();
// Cancel the thread task.
- if (cancel_timer_task) {
- kernel.HardwareTimer().CancelTask(waiting_thread);
+ if (cancel_timer_task && m_hardware_timer != nullptr) {
+ m_hardware_timer->CancelTask(waiting_thread);
}
}