mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 04:33:21 +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>
|
/// <summary>
|
||||||
/// Unregisters a blocking <see cref="OverlayContainer"/> that was not created by <see cref="OsuGame"/> itself.
|
/// Unregisters a blocking <see cref="OverlayContainer"/> that was not created by <see cref="OsuGame"/> itself.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void unregisterBlockingOverlay(OverlayContainer overlayContainer)
|
private void unregisterBlockingOverlay(OverlayContainer overlayContainer) => Schedule(() =>
|
||||||
{
|
{
|
||||||
externalOverlays.Remove(overlayContainer);
|
externalOverlays.Remove(overlayContainer);
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ namespace osu.Game
|
|||||||
focusedOverlays.Remove(focusedOverlayContainer);
|
focusedOverlays.Remove(focusedOverlayContainer);
|
||||||
|
|
||||||
overlayContainer.Expire();
|
overlayContainer.Expire();
|
||||||
}
|
});
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user