mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 16:18:58 +00:00
UICommon: fix m_cached_files pruning (partial revert of 68152faf43
)
vector::pop_back invalidates all iterators
This commit is contained in:
parent
512c6fee51
commit
7a13bdbdfb
1 changed files with 1 additions and 1 deletions
|
@ -111,9 +111,9 @@ bool GameFileCache::Update(
|
||||||
cache_changed = true;
|
cache_changed = true;
|
||||||
--end;
|
--end;
|
||||||
*it = std::move(*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
|
// Now that the previous loop has run, game_paths only contains paths that
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue