From 126309c379e3338f21b6898f88a6c7d96d926b7e Mon Sep 17 00:00:00 2001 From: Zonespace <41448081+Zonespace27@users.noreply.github.com> Date: Fri, 17 Nov 2023 13:54:10 -0800 Subject: [PATCH] Fix bug in med_hud_set_health() for xenomorphs --- code/datums/mob_hud.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/datums/mob_hud.dm b/code/datums/mob_hud.dm index b0df9bca7745..ff1263510761 100644 --- a/code/datums/mob_hud.dm +++ b/code/datums/mob_hud.dm @@ -283,6 +283,12 @@ var/list/datum/mob_hud/huds = list( return /mob/living/carbon/xenomorph/med_hud_set_health() + if(QDELETED(src)) + return + + if(!(HEALTH_HUD_XENO in hud_list)) + CRASH("hud_list lacks HEALTH_HUD_XENO despite not being deleted in med_hud_set_health()") + var/image/holder = hud_list[HEALTH_HUD_XENO] var/health_hud_type = "xenohealth"