summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-03-20 03:45:34 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2019-03-20 03:45:34 +0100
commit8a320a6ee2d803f607655206d0f3315d4e7c9f57 (patch)
tree222002a17aea0fe27fbbd1769be1f979808e2170 /src/core/hle/kernel/thread.cpp
parentMerge pull request #2258 from lioncash/am (diff)
downloadyuzu-8a320a6ee2d803f607655206d0f3315d4e7c9f57.tar
yuzu-8a320a6ee2d803f607655206d0f3315d4e7c9f57.tar.gz
yuzu-8a320a6ee2d803f607655206d0f3315d4e7c9f57.tar.bz2
yuzu-8a320a6ee2d803f607655206d0f3315d4e7c9f57.tar.lz
yuzu-8a320a6ee2d803f607655206d0f3315d4e7c9f57.tar.xz
yuzu-8a320a6ee2d803f607655206d0f3315d4e7c9f57.tar.zst
yuzu-8a320a6ee2d803f607655206d0f3315d4e7c9f57.zip
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-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();