diff --git a/Core/HW/AsyncIOManager.cpp b/Core/HW/AsyncIOManager.cpp index 3ff26be160..89dfaf6481 100644 --- a/Core/HW/AsyncIOManager.cpp +++ b/Core/HW/AsyncIOManager.cpp @@ -32,9 +32,11 @@ bool AsyncIOManager::HasOperation(u32 handle) { } void AsyncIOManager::ScheduleOperation(AsyncIOEvent ev) { - lock_guard guard(resultsLock_); - if (!resultsPending_.insert(ev.handle).second) { - ERROR_LOG_REPORT(SCEIO, "Scheduling operation for file %d while one is pending (type %d)", ev.handle, ev.type); + { + lock_guard guard(resultsLock_); + if (!resultsPending_.insert(ev.handle).second) { + ERROR_LOG_REPORT(SCEIO, "Scheduling operation for file %d while one is pending (type %d)", ev.handle, ev.type); + } } ScheduleEvent(ev); }