]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix health analyzer crash (#26700)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Thu, 4 Apr 2024 06:26:54 +0000 (06:26 +0000)
committerGitHub <noreply@github.com>
Thu, 4 Apr 2024 06:26:54 +0000 (17:26 +1100)
Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.Server/Medical/HealthAnalyzerSystem.cs

index 01d0d5c791e47bed43902726acbfbb2a2705f48a..4988608327afd01e1b37a582676a29ec8e2fe4f4 100644 (file)
@@ -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