]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Don't remove item slots when terminating. (#14042)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sun, 12 Feb 2023 01:14:02 +0000 (14:14 +1300)
committerGitHub <noreply@github.com>
Sun, 12 Feb 2023 01:14:02 +0000 (01:14 +0000)
Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs

index f20fa53c607eb4ce7d807dbf8c4210c2bb1f8c81..059bf5cb4fbe7c3380b8f5b760d76d618ea6bf05 100644 (file)
@@ -111,7 +111,7 @@ namespace Content.Shared.Containers.ItemSlots
         /// </summary>
         public void RemoveItemSlot(EntityUid uid, ItemSlot slot, ItemSlotsComponent? itemSlots = null)
         {
-            if (slot.ContainerSlot == null)
+            if (Terminating(uid) || slot.ContainerSlot == null)
                 return;
 
             slot.ContainerSlot.Shutdown();