]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix collection modified error when locking storage (#27913)
authorShadowCommander <shadowjjt@gmail.com>
Sat, 11 May 2024 09:25:40 +0000 (02:25 -0700)
committerGitHub <noreply@github.com>
Sat, 11 May 2024 09:25:40 +0000 (02:25 -0700)
Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

index ba840cd67adb009b0bc5dbce1267c15ed46df731..8ad588baab0880df04608567b1bbc94a053a363b 100644 (file)
@@ -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);
         }