summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-03-21 02:36:55 +0100
committerGitHub <noreply@github.com>2019-03-21 02:36:55 +0100
commit872a7bee725b01d611903fe1dfa96a314324b413 (patch)
tree7f154ee4fc6f9922369756d7771cce8de7bb4b8a
parentMerge pull request #2247 from lioncash/include (diff)
parentFix crash caused by 2238. (diff)
downloadyuzu-872a7bee725b01d611903fe1dfa96a314324b413.tar
yuzu-872a7bee725b01d611903fe1dfa96a314324b413.tar.gz
yuzu-872a7bee725b01d611903fe1dfa96a314324b413.tar.bz2
yuzu-872a7bee725b01d611903fe1dfa96a314324b413.tar.lz
yuzu-872a7bee725b01d611903fe1dfa96a314324b413.tar.xz
yuzu-872a7bee725b01d611903fe1dfa96a314324b413.tar.zst
yuzu-872a7bee725b01d611903fe1dfa96a314324b413.zip
-rw-r--r--src/core/hle/kernel/thread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index d9ffebc3f..3b22e8e0d 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -314,8 +314,9 @@ void Thread::UpdatePriority() {
}
// Ensure that the thread is within the correct location in the waiting list.
+ auto old_owner = lock_owner;
lock_owner->RemoveMutexWaiter(this);
- lock_owner->AddMutexWaiter(this);
+ old_owner->AddMutexWaiter(this);
// Recursively update the priority of the thread that depends on the priority of this one.
lock_owner->UpdatePriority();