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:
parent
d43b980a17
commit
3e3843dcf9
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user