mirror of
https://github.com/ppy/osu.git
synced 2026-05-24 01:14:51 +08:00
Fix potential crash on CloseAllOverlays due to collection mutation
This commit is contained in:
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user