From f01a2b8a44bdd2990db4d160f844d48688833b87 Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Mon, 18 Sep 2023 20:25:27 -0500 Subject: [PATCH] Fixes qdel in new error (#2360) ## About The Pull Request Fixes that one spurious fail by making sure non-initialised bottles don't smash ## Why It's Good For The Game Yes ## Changelog :cl: /:cl: --- code/modules/food_and_drinks/drinks/drinks/bottle.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 65c3ac05dd5b..77de6fddcad7 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -35,6 +35,8 @@ custom_price = 55 /obj/item/reagent_containers/food/drinks/bottle/smash(mob/living/target, mob/thrower, ranged = FALSE) + if(QDELING(src) || !target || !(flags_1 & INITIALIZED_1)) //Invalid loc + return //Creates a shattering noise and replaces the bottle with a broken_bottle if(bartender_check(target) && ranged) return