From bbbced8835766591b11eae8c5e4aeec67d2e558e Mon Sep 17 00:00:00 2001 From: "morikou@gmail.com" Date: Wed, 25 May 2011 00:52:09 +0000 Subject: [PATCH] Fixing a runtime error introduced in r1615. Note: Checking a null object with istype won't throw up a runtime error but checking a var of a null object will. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1616 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/mob/mob.dm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 0a5a612e8bc..464edd9927b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1134,19 +1134,19 @@ proc/isobserver(A) /mob/proc/drop_item() var/obj/item/W = equipped() - if(W.twohanded) - if(W.wielded) - if(hand) - var/obj/item/weapon/offhand/O = r_hand - del O - else - var/obj/item/weapon/offhand/O = l_hand - del O - W.wielded = 0 //Kinda crude, but gets the job done with minimal pain -Agouri - W.name = "[initial(W.name)]" //name reset so people don't see world fireaxes with (unwielded) or (wielded) tags - W.update_icon() if (W) + if(W.twohanded) + if(W.wielded) + if(hand) + var/obj/item/weapon/offhand/O = r_hand + del O + else + var/obj/item/weapon/offhand/O = l_hand + del O + W.wielded = 0 //Kinda crude, but gets the job done with minimal pain -Agouri + W.name = "[initial(W.name)]" //name reset so people don't see world fireaxes with (unwielded) or (wielded) tags + W.update_icon() u_equip(W) if (client) client.screen -= W