Don't remove item slots when terminating. (#14042)

This commit is contained in:
Leon Friedrich
2023-02-12 14:14:02 +13:00
committed by GitHub
parent c6c319f7e4
commit e0dd65983e

View File

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