1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-26 04:29:54 +08:00

Merge pull request #18906 from peppy/fix-collection-modified-close-all-overlays

Fix potential crash on `CloseAllOverlays` due to collection mutation
This commit is contained in:
Bartłomiej Dach
2022-06-27 19:10:49 +02:00
committed by GitHub
Unverified
+2 -2
View File
@@ -231,7 +231,7 @@ namespace osu.Game
/// <summary>
/// Unregisters a blocking <see cref="OverlayContainer"/> that was not created by <see cref="OsuGame"/> itself.
/// </summary>
private void unregisterBlockingOverlay(OverlayContainer overlayContainer)
private void unregisterBlockingOverlay(OverlayContainer overlayContainer) => Schedule(() =>
{
externalOverlays.Remove(overlayContainer);
@@ -239,7 +239,7 @@ namespace osu.Game
focusedOverlays.Remove(focusedOverlayContainer);
overlayContainer.Expire();
}
});
#endregion