1
0
Fork 0
forked from suyu/suyu

Merge pull request #2267 from FernandoS27/fix-2238

Fix crash caused by #2238.
This commit is contained in:
bunnei 2019-03-20 21:36:55 -04:00 committed by GitHub
commit 872a7bee72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();