From c18f3146848e8efbf86ccb7fc5eeafc8fdb52a78 Mon Sep 17 00:00:00 2001 From: Contrabang <91113370+Contrabang@users.noreply.github.com> Date: Wed, 13 Dec 2023 10:42:34 -0500 Subject: [PATCH] runtime moment (#23542) --- code/modules/mob/living/living.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 9cfd411433a..b84208fba69 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -268,11 +268,12 @@ /mob/living/run_pointed(atom/A) if(!..()) return FALSE - var/obj/item/hand_item = get_active_hand() var/pointed_object = "\the [A]" if(A.loc in src) pointed_object += " inside [A.loc]" - if(HAS_TRAIT(hand_item, TRAIT_CAN_POINT_WITH) && A != hand_item) + + var/obj/item/hand_item = get_active_hand() + if(!QDELETED(hand_item) && istype(hand_item) && HAS_TRAIT(hand_item, TRAIT_CAN_POINT_WITH) && A != hand_item) if(a_intent == INTENT_HELP || !ismob(A)) visible_message("[src] points to [pointed_object] with [hand_item]") return TRUE