From 00558f129b60c7cebb2b34142d14980570b86fe9 Mon Sep 17 00:00:00 2001 From: Bizzonium Date: Sun, 2 Aug 2020 19:32:23 +0300 Subject: [PATCH] Fix runtime in wires.dm when holder is null --- code/datums/wires/wires.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 09c874ce8a8..30615c1dbb6 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -141,7 +141,7 @@ GLOBAL_LIST_INIT(wireColours, list("red", "blue", "green", "black", "orange", "b if(..()) return 1 var/mob/L = usr - if(CanUse(L) && href_list["action"]) + if(holder && CanUse(L) && href_list["action"]) var/obj/item/I = L.get_active_hand() var/colour = lowertext(href_list["wire"]) holder.add_hiddenprint(L) @@ -194,7 +194,7 @@ GLOBAL_LIST_INIT(wireColours, list("red", "blue", "green", "black", "orange", "b return 1 /datum/wires/CanUseTopic(mob/user, datum/topic_state/state) - if(!CanUse(user)) + if(holder && !CanUse(user)) return STATUS_CLOSE return ..()