diff --git a/Subsurface/Source/GUI/GUIComponent.cs b/Subsurface/Source/GUI/GUIComponent.cs index f48325221..b059c8267 100644 --- a/Subsurface/Source/GUI/GUIComponent.cs +++ b/Subsurface/Source/GUI/GUIComponent.cs @@ -28,7 +28,12 @@ namespace Barotrauma if (!Visible) return; if (ComponentsToUpdate.Contains(this)) return; ComponentsToUpdate.Add(this); - children.ForEach(c => c.AddToGUIUpdateList()); + + List fixedChildren = new List(children); + foreach (GUIComponent c in fixedChildren) + { + c.AddToGUIUpdateList(); + } } public static void ClearUpdateList()