diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 9d909ea01..eee7c4935 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp @@ -100,11 +100,10 @@ bool ReleaseMutexForThread(Mutex* mutex, Handle thread) { bool ReleaseMutex(Mutex* mutex) { MutexEraseLock(mutex); bool woke_threads = false; - std::vector::iterator iter; // Find the next waiting thread for the mutex... while (!woke_threads && !mutex->waiting_threads.empty()) { - iter = mutex->waiting_threads.begin(); + std::vector::iterator iter = mutex->waiting_threads.begin(); woke_threads |= ReleaseMutexForThread(mutex, *iter); mutex->waiting_threads.erase(iter); }