From aebdc5bb80e82d3c62eeae2d40d4cbd126cba171 Mon Sep 17 00:00:00 2001 From: Giacomand Date: Wed, 3 Apr 2013 14:49:09 +0100 Subject: [PATCH] * Small update to check that user isn't null and that the spawned item is a /obj/item before trying to put it in the user's hand. --- code/datums/uplink_item.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 34349795933..7e203938e4a 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -55,7 +55,7 @@ var/list/uplink_items = list() if(!istype(U)) return 0 - if (user.stat || user.restrained()) + if (!user || user.stat || user.restrained()) return 0 if (!( istype(user, /mob/living/carbon/human))) @@ -69,7 +69,7 @@ var/list/uplink_items = list() var/obj/I = spawn_item(get_turf(user), U) - if(ishuman(user)) + if(istype(I, /obj/item) && ishuman(user)) var/mob/living/carbon/human/A = user A.put_in_any_hand_if_possible(I) U.purchase_log += "[user] ([user.ckey]) bought [name]."