From b89c01391a9e950988bba400a2c5be3ac465ec38 Mon Sep 17 00:00:00 2001 From: Krausus Date: Thu, 14 May 2015 05:06:11 -0400 Subject: [PATCH] Fixes IPC death runtimes These seemed to happen consistently when they were EMP'd to death --- code/modules/mob/living/carbon/species.dm | 4 ++-- code/modules/organs/organ_external.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm index 6a6954ae419..69c7979e62c 100644 --- a/code/modules/mob/living/carbon/species.dm +++ b/code/modules/mob/living/carbon/species.dm @@ -726,10 +726,10 @@ if (organ_name == "head") // do the head last as that's when the user will be transfered to the posibrain continue var/obj/item/organ/external/O = H.organs_by_name[organ_name] - if((O.body_part != UPPER_TORSO) && (O.body_part != LOWER_TORSO)) // We're making them fall apart, not gibbing them! + if(O && (O.body_part != UPPER_TORSO) && (O.body_part != LOWER_TORSO)) // We're making them fall apart, not gibbing them! O.droplimb(1) var/obj/item/organ/external/O = H.organs_by_name["head"] - O.droplimb(1) + if(O) O.droplimb(1) //Species unarmed attacks diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index c02920141e5..1dcedb8f8c0 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -220,7 +220,7 @@ else droplimb(0,DROPLIMB_BLUNT) - owner_old.updatehealth() + if(owner_old) owner_old.updatehealth() return update_icon() /obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0)