From 7af74a91ac2934162cf3a39b5d5c88e15408d3cd Mon Sep 17 00:00:00 2001 From: KathyRyals <65850818+KathyRyals@users.noreply.github.com> Date: Sat, 1 Aug 2020 19:50:18 +0200 Subject: [PATCH] Fixes a runtime caused by an improperly affected variable. (#52628) * Fixes a runtime caused by an improperly affected variable. * Updated iscleanable() * Update code/__DEFINES/is_helpers.dm Co-authored-by: Kyle Spier-Swenson Co-authored-by: Kyle Spier-Swenson --- code/__DEFINES/is_helpers.dm | 2 +- code/modules/reagents/chemistry/reagents/other_reagents.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 67a6a8c2f9d..9ff6c8e84d2 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -172,7 +172,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list( #define ismecha(A) (istype(A, /obj/mecha)) -#define ismopable(A) (A.layer <= HIGH_SIGIL_LAYER) //If something can be cleaned by floor-cleaning devices such as mops or clean bots +#define ismopable(A) (A && (A.layer <= HIGH_SIGIL_LAYER)) //If something can be cleaned by floor-cleaning devices such as mops or clean bots #define isorgan(A) (istype(A, /obj/item/organ)) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index cd42a1a1c5c..5393c9afaee 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1072,7 +1072,7 @@ if(reac_volume >= 1) T.wash(clean_types) for(var/am in T) - var/atom/movable/movable_content + var/atom/movable/movable_content = am if(ismopable(movable_content)) // Mopables will be cleaned anyways by the turf wash continue movable_content.wash(clean_types)