fix xenoarch death trigger exception (#12465)

* fix xenoarch death trigger exception

* generalize
This commit is contained in:
Nemanja
2022-11-08 13:53:49 -05:00
committed by GitHub
parent ac99f4dd5e
commit 448baf111d

View File

@@ -302,6 +302,10 @@ namespace Content.Shared.MobState.EntitySystems
/// </summary>
private void SetMobState(MobStateComponent component, DamageState? old, (DamageState state, FixedPoint2 threshold)? current, EntityUid? origin = null)
{
//if it got deleted instantly in a nuke or something
if (!Exists(component.Owner) || Deleted(component.Owner))
return;
if (!current.HasValue)
{
ExitState(component, old);