Fixes runtimes related to blowing up 25 vending machines at once (#22855)

* throw_impact() checks that A exists, preventing issues with violent explosions

* also check !qdeleted(A)
This commit is contained in:
Mervill
2017-01-10 10:00:42 +13:00
committed by oranges
parent 32a2f2bf5e
commit 091c5c669f
+5 -4
View File
@@ -506,10 +506,11 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
else ..()
/obj/item/throw_impact(atom/A)
var/itempush = 1
if(w_class < 4)
itempush = 0 //too light to push anything
return A.hitby(src, 0, itempush)
if(A && !qdeleted(A))
var/itempush = 1
if(w_class < 4)
itempush = 0 //too light to push anything
return A.hitby(src, 0, itempush)
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
thrownby = thrower