From f47f8d5a1e94084ea87278f747360fff49de96f4 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Tue, 16 Aug 2022 15:45:59 +1200 Subject: [PATCH] Fix miasma error (#10629) --- Content.Server/Atmos/Miasma/MiasmaSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Atmos/Miasma/MiasmaSystem.cs b/Content.Server/Atmos/Miasma/MiasmaSystem.cs index 783fe68cf7..df066048c0 100644 --- a/Content.Server/Atmos/Miasma/MiasmaSystem.cs +++ b/Content.Server/Atmos/Miasma/MiasmaSystem.cs @@ -208,6 +208,7 @@ namespace Content.Server.Atmos.Miasma ToggleDecomposition(args.Entity, false, perishable); } } + private void OnEntRemoved(EntityUid uid, AntiRottingContainerComponent component, EntRemovedFromContainerMessage args) { if (TryComp(args.Entity, out var perishable) && !Terminating(uid)) @@ -217,7 +218,6 @@ namespace Content.Server.Atmos.Miasma } } - /// Fly stuff private void OnFliesInit(EntityUid uid, FliesComponent component, ComponentInit args) @@ -235,7 +235,7 @@ namespace Content.Server.Atmos.Miasma public void ToggleDecomposition(EntityUid uid, bool decompose, PerishableComponent? perishable = null) { - if (!Resolve(uid, ref perishable)) + if (Terminating(uid) || !Resolve(uid, ref perishable)) return; if (decompose == perishable.Progressing) // Saved a few cycles