Fix SolutionAreaEffectSystem exception when the collection is modified.

This commit is contained in:
Vera Aguilera Puerto
2021-05-08 03:26:07 +02:00
parent 5f65c12d2f
commit 35fc0a2e8a

View File

@@ -1,4 +1,5 @@
#nullable enable
using System.Linq;
using Content.Server.GameObjects.Components.Chemistry;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
@@ -10,7 +11,7 @@ namespace Content.Server.GameObjects.EntitySystems
{
public override void Update(float frameTime)
{
foreach (var inception in ComponentManager.EntityQuery<SolutionAreaEffectInceptionComponent>())
foreach (var inception in ComponentManager.EntityQuery<SolutionAreaEffectInceptionComponent>().ToArray())
{
inception.InceptionUpdate(frameTime);
}