mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 14:25:10 +08:00
Fix enumeration over modified collection
This commit is contained in:
parent
81b36d897d
commit
b1f653899c
@ -137,6 +137,10 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
private void loadBeatmapSets(IEnumerable<BeatmapSetInfo> beatmapSets)
|
||||
{
|
||||
// Ensure no changes are made to the list while we are initialising items.
|
||||
// We'll catch up on changes via subscriptions anyway.
|
||||
beatmapSets = beatmapSets.ToArray();
|
||||
|
||||
if (selectedBeatmapSet != null && !beatmapSets.Contains(selectedBeatmapSet.BeatmapSet))
|
||||
selectedBeatmapSet = null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user