diff options
author | Liam <byteslice@airmail.cc> | 2022-07-10 00:54:54 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-07-10 00:54:54 +0200 |
commit | 1611c53c12256cb01813310bbef673f42951b8de (patch) | |
tree | 4aa5eda26aed9145f724f442ff9e5e8220b5c22e /src/core | |
parent | Merge pull request #8501 from liamwhite/backtrace-again (diff) | |
download | yuzu-1611c53c12256cb01813310bbef673f42951b8de.tar yuzu-1611c53c12256cb01813310bbef673f42951b8de.tar.gz yuzu-1611c53c12256cb01813310bbef673f42951b8de.tar.bz2 yuzu-1611c53c12256cb01813310bbef673f42951b8de.tar.lz yuzu-1611c53c12256cb01813310bbef673f42951b8de.tar.xz yuzu-1611c53c12256cb01813310bbef673f42951b8de.tar.zst yuzu-1611c53c12256cb01813310bbef673f42951b8de.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 50cb5fc90..90de86770 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -308,14 +308,20 @@ void KThread::Finalize() { auto it = waiter_list.begin(); while (it != waiter_list.end()) { - // Clear the lock owner - it->SetLockOwner(nullptr); + // Get the thread. + KThread* const waiter = std::addressof(*it); + + // The thread shouldn't be a kernel waiter. + ASSERT(!IsKernelAddressKey(waiter->GetAddressKey())); + + // Clear the lock owner. + waiter->SetLockOwner(nullptr); // Erase the waiter from our list. it = waiter_list.erase(it); // Cancel the thread's wait. - it->CancelWait(ResultInvalidState, true); + waiter->CancelWait(ResultInvalidState, true); } } |