1
0
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:
Dean Herbert 2024-08-28 16:30:09 +09:00
parent 81b36d897d
commit b1f653899c
No known key found for this signature in database

View File

@ -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;