From 0f1ae264f8c56e2f6b7465be4900fda7e4329e35 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Wed, 9 Nov 2016 04:28:51 -0500 Subject: [PATCH] Resolves a runtime with alt icons. The runtime occurred when get_icon_state() attempted to handle_alt_icon on a head, even if if was a stump. Adds sanity to check if it's a stump or if the organ's destroyed (as how it's handled in update_icons for mobs) and resolves the runtime and #5863. --- code/modules/surgery/organs/organ_icon.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index 272adcad52c..03690ef3279 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -159,7 +159,7 @@ var/global/list/limb_icon_cache = list() gender = "f" else gender = "m" - if(limb_name == "head") + if(limb_name == "head" && !is_stump() && !(status & ORGAN_DESTROYED)) var/obj/item/organ/external/head/head_organ = src head_organ.handle_alt_icon()