aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/mutex.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-06 01:11:56 -0400
committerLioncash <mathew1800@gmail.com>2018-10-06 01:13:02 -0400
commit809edc848fb9ed9348693c7625255547644812f0 (patch)
tree33f58620df6629bcdb848fe6659cbe5966073e91 /src/core/hle/kernel/mutex.cpp
parent977327193758d8fbabee4a28dc8c687897b99a5f (diff)
kernel/mutex: Amend behavior of TransferMutexOwnership()
This was the result of a typo accidentally introduced in b355b43bfafc390389906731c0f131c712f9089d. This restores the previous correct behavior. The behavior with the reference was incorrect and would cause some games to fail to boot.
Diffstat (limited to 'src/core/hle/kernel/mutex.cpp')
-rw-r--r--src/core/hle/kernel/mutex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index 78d8b74bb2..dd541ffcc6 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -47,7 +47,7 @@ static std::pair<SharedPtr<Thread>, u32> GetHighestPriorityMutexWaitingThread(
/// Update the mutex owner field of all threads waiting on the mutex to point to the new owner.
static void TransferMutexOwnership(VAddr mutex_addr, SharedPtr<Thread> current_thread,
SharedPtr<Thread> new_owner) {
- const auto& threads = current_thread->GetMutexWaitingThreads();
+ const auto threads = current_thread->GetMutexWaitingThreads();
for (const auto& thread : threads) {
if (thread->GetMutexWaitAddress() != mutex_addr)
continue;