mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Add ToArray()
calls to removal iteration for safety
This commit is contained in:
@ -142,9 +142,9 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
case NotifyCollectionChangedAction.Remove:
|
case NotifyCollectionChangedAction.Remove:
|
||||||
foreach (var point in e.OldItems.Cast<PathControlPoint>())
|
foreach (var point in e.OldItems.Cast<PathControlPoint>())
|
||||||
{
|
{
|
||||||
foreach (var piece in Pieces.Where(p => p.ControlPoint == point))
|
foreach (var piece in Pieces.Where(p => p.ControlPoint == point).ToArray())
|
||||||
piece.RemoveAndDisposeImmediately();
|
piece.RemoveAndDisposeImmediately();
|
||||||
foreach (var connection in Connections.Where(c => c.ControlPoint == point))
|
foreach (var connection in Connections.Where(c => c.ControlPoint == point).ToArray())
|
||||||
connection.RemoveAndDisposeImmediately();
|
connection.RemoveAndDisposeImmediately();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user