From ff158c562aab45bcbb5c23e19ec0ac440dd919da Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 18 Jul 2022 17:55:25 +0200 Subject: [PATCH] [MIRROR] adds a null check to CanReach() [MDB IGNORE] (#14956) * adds a null check to CanReach() * Update click.dm fix a code conflict Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com> Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com> Co-authored-by: GoldenAlpharex --- code/_onclick/click.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index d14cad5b459..9739001df38 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -221,7 +221,7 @@ if(closed[target] || isarea(target)) // avoid infinity situations continue - if(isturf(target) || isturf(target.loc) || (target in direct_access) || (ismovable(target) && target.flags_1 & IS_ONTOP_1) || target.loc.atom_storage) //Directly accessible atoms + if(isturf(target) || isturf(target.loc) || (target in direct_access) || (ismovable(target) && target.flags_1 & IS_ONTOP_1) || target.loc?.atom_storage) //Directly accessible atoms if(Adjacent(target) || (tool && CheckToolReach(src, target, tool.reach))) //Adjacent or reaching attacks return TRUE