diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index a041ad9be1..04648c39b3 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -47,7 +47,10 @@ if (!can_touch(user) || !climbable) return - var/obj/machinery/door/poddoor/shutters/S = locate() in src.contents + var/turf/T = src.loc + if(!T || !istype(T)) return + + var/obj/machinery/door/poddoor/shutters/S = locate() in T.contents if(S && S.density) return usr.visible_message("[user] starts climbing onto \the [src]!") @@ -58,7 +61,7 @@ if (!can_touch(user) || !climbable) return - S = locate() in src.contents + S = locate() in T.contents if(S && S.density) return usr.loc = get_turf(src)