From 170e13b7aa8644c6db8ef3809554455c069a617d Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 4 Apr 2024 06:26:54 +0000 Subject: [PATCH] fix health analyzer crash (#26700) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Server/Medical/HealthAnalyzerSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/Medical/HealthAnalyzerSystem.cs b/Content.Server/Medical/HealthAnalyzerSystem.cs index 01d0d5c791..4988608327 100644 --- a/Content.Server/Medical/HealthAnalyzerSystem.cs +++ b/Content.Server/Medical/HealthAnalyzerSystem.cs @@ -49,6 +49,12 @@ public sealed class HealthAnalyzerSystem : EntitySystem if (component.ScannedEntity is not {} patient) continue; + if (Deleted(patient)) + { + StopAnalyzingEntity((uid, component), patient); + continue; + } + component.NextUpdate = _timing.CurTime + component.UpdateInterval; //Get distance between health analyzer and the scanned entity -- 2.52.0