mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +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:
commit
8051a5a192
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user