diff --git a/Source/Core/UICommon/GameFileCache.cpp b/Source/Core/UICommon/GameFileCache.cpp index 7f9b7015b2..e2e2848f10 100644 --- a/Source/Core/UICommon/GameFileCache.cpp +++ b/Source/Core/UICommon/GameFileCache.cpp @@ -111,9 +111,9 @@ bool GameFileCache::Update( cache_changed = true; --end; *it = std::move(*end); - m_cached_files.pop_back(); } } + m_cached_files.erase(it, m_cached_files.end()); } // Now that the previous loop has run, game_paths only contains paths that