fix health analyzer crash (#26700)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2024-04-04 06:26:54 +00:00
committed by GitHub
parent 1e43980482
commit 170e13b7aa

View 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