From 1db48b86d1355cc2653989d2eaf5d7b179fa76af Mon Sep 17 00:00:00 2001 From: ShadowCommander Date: Sat, 11 May 2024 02:25:40 -0700 Subject: [PATCH] Fix collection modified error when locking storage (#27913) --- Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs index ba840cd67a..8ad588baab 100644 --- a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs @@ -1411,11 +1411,11 @@ public abstract class SharedStorageSystem : EntitySystem return; // Gets everyone looking at the UI - foreach (var actor in _ui.GetActors(uid, StorageComponent.StorageUiKey.Key)) + foreach (var actor in _ui.GetActors(uid, StorageComponent.StorageUiKey.Key).ToList()) { if (_admin.HasAdminFlag(actor, AdminFlags.Admin)) continue; - + // And closes it unless they're an admin _ui.CloseUi(uid, StorageComponent.StorageUiKey.Key, actor); } -- 2.51.2