From: themias <89101928+themias@users.noreply.github.com> Date: Thu, 1 Feb 2024 22:33:53 +0000 (-0500) Subject: Fix cryopod debug assert (#24830) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=efb623de19d1107f6319ebef451c043c0c606579;p=space-station-14.git Fix cryopod debug assert (#24830) --- 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 ));