From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 4 Apr 2024 06:26:54 +0000 (+0000) Subject: fix health analyzer crash (#26700) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=170e13b7aa8644c6db8ef3809554455c069a617d;p=space-station-14.git fix health analyzer crash (#26700) Co-authored-by: deltanedas <@deltanedas:kde.org> --- 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