From efb623de19d1107f6319ebef451c043c0c606579 Mon Sep 17 00:00:00 2001 From: themias <89101928+themias@users.noreply.github.com> Date: Thu, 1 Feb 2024 17:33:53 -0500 Subject: [PATCH] Fix cryopod debug assert (#24830) --- Content.Server/Medical/CryoPodSystem.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Content.Server/Medical/CryoPodSystem.cs b/Content.Server/Medical/CryoPodSystem.cs index e05dc2494f..2f08dfddd1 100644 --- a/Content.Server/Medical/CryoPodSystem.cs +++ b/Content.Server/Medical/CryoPodSystem.cs @@ -181,6 +181,9 @@ public sealed partial class CryoPodSystem : SharedCryoPodSystem private void OnActivateUI(Entity entity, ref AfterActivatableUIOpenEvent args) { + if (!entity.Comp.BodyContainer.ContainedEntity.HasValue) + return; + TryComp(entity.Comp.BodyContainer.ContainedEntity, out var temp); TryComp(entity.Comp.BodyContainer.ContainedEntity, out var bloodstream); @@ -189,7 +192,8 @@ public sealed partial class CryoPodSystem : SharedCryoPodSystem HealthAnalyzerUiKey.Key, new HealthAnalyzerScannedUserMessage(GetNetEntity(entity.Comp.BodyContainer.ContainedEntity), temp?.CurrentTemperature ?? 0, - (bloodstream != null && _solutionContainerSystem.ResolveSolution(entity.Owner, bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution)) + (bloodstream != null && _solutionContainerSystem.ResolveSolution(entity.Comp.BodyContainer.ContainedEntity.Value, + bloodstream.BloodSolutionName, ref bloodstream.BloodSolution, out var bloodSolution)) ? bloodSolution.FillFraction : 0 )); -- 2.51.2