From 091c5c669f04fa3ca092c60170fc217752fbdaba Mon Sep 17 00:00:00 2001 From: Mervill Date: Mon, 9 Jan 2017 13:00:42 -0800 Subject: [PATCH] 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) --- code/game/objects/items.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 49bad5e7b5a..c36ca374a83 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -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