Runtime fix blood_DNA length checks when it's possibly null.

runtime error: Cannot read null.len
proc name: attack self (/obj/item/weapon/melee/telebaton/attack_self)
  source file: swords_axes_etc.dm,156
This commit is contained in:
Ccomp5950
2014-02-24 00:47:55 -06:00
parent cea151813e
commit 1eb66f1f78

View File

@@ -153,7 +153,7 @@
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
add_fingerprint(user)
if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any
overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
var/icon/I = new /icon(src.icon, src.icon_state)
@@ -265,4 +265,4 @@
H.update_inv_r_hand()
add_fingerprint(user)
return
return