1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:03:08 +08:00

Fix potential crash on CloseAllOverlays due to collection mutation

This commit is contained in:
Dean Herbert 2022-06-28 00:32:36 +09:00
parent d43b980a17
commit 3e3843dcf9

View File

@ -249,7 +249,7 @@ namespace osu.Game
/// <param name="hideToolbar">Whether the toolbar should also be hidden.</param>
public void CloseAllOverlays(bool hideToolbar = true)
{
foreach (var overlay in focusedOverlays)
foreach (var overlay in focusedOverlays.ToArray())
overlay.Hide();
if (hideToolbar) Toolbar.Hide();