aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-03-19 22:45:34 -0400
committerFernando Sahmkow <fsahmkow27@gmail.com>2019-03-19 22:45:34 -0400
commit18ca210bb73dd791a551e76bd410cf429ce9095b (patch)
tree222002a17aea0fe27fbbd1769be1f979808e2170 /src/core/hle/kernel/thread.cpp
parent5228d3bf7b2617fe99ee1ca7b7310404261cbd91 (diff)
Fix crash caused by 2238.
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 d9ffebc3ff..3b22e8e0d2 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();