Adds a number of accessory related null checks

This commit is contained in:
Anewbe
2018-05-25 12:29:33 -05:00
parent 841837191c
commit d8f1069689
5 changed files with 6 additions and 6 deletions
@@ -241,7 +241,7 @@
if(legcuffed)
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
if(suit && suit.accessories.len)
if(suit && LAZYLEN(suit.accessories))
dat += "<BR><A href='?src=\ref[src];item=tie'>Remove accessory</A>"
dat += "<BR><A href='?src=\ref[src];item=splints'>Remove splints</A>"
dat += "<BR><A href='?src=\ref[src];item=pockets'>Empty pockets</A>"
@@ -33,7 +33,7 @@
return
if("tie")
var/obj/item/clothing/under/suit = w_uniform
if(!istype(suit) || !suit.accessories.len)
if(!istype(suit) || !LAZYLEN(suit.accessories))
return
var/obj/item/clothing/accessory/A = suit.accessories[1]
if(!istype(A))