diff --git a/Content.Server/_Sunrise/DontSellingGrid/DontSellingGridSystems.cs b/Content.Server/_Sunrise/DontSellingGrid/DontSellingGridSystems.cs index df1cca5bdd..0d389e9a3b 100644 --- a/Content.Server/_Sunrise/DontSellingGrid/DontSellingGridSystems.cs +++ b/Content.Server/_Sunrise/DontSellingGrid/DontSellingGridSystems.cs @@ -72,6 +72,9 @@ public sealed class StationDontSellingSystems : EntitySystem private void DepreciatePrice(EntityUid uid) { + if (!uid.IsValid()) + return; + EnsureComp(uid); if (!_containerQuery.TryComp(uid, out var containers)) @@ -81,7 +84,8 @@ public sealed class StationDontSellingSystems : EntitySystem { foreach (var ent in container.ContainedEntities) { - DepreciatePrice(ent); + if (ent.IsValid()) + DepreciatePrice(ent); } } }