From fa3ecba0593ec7c78be4476c687b142fbd57f8d4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 12 Oct 2022 19:52:17 +0200 Subject: [PATCH] [MIRROR] Fixes away mission gateway runtime [MDB IGNORE] (#16795) * Fixes away mission gateway runtime (#70342) cl ShizCalev fix: Fixed a runtime when clicking an away mission gateway without the partner gateway being active. /cl * Fixes away mission gateway runtime Co-authored-by: ShizCalev --- code/modules/awaymissions/gateway.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 704bb6b7a47..5f6a66032f7 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -455,7 +455,8 @@ GLOBAL_LIST_EMPTY(gateway_destinations) // Rather then that, let's just render a little preview port to the console, because for reasons that's trivial vis_contents = null - if(!our_destination) + var/turf/center_turf = our_destination?.get_target_turf() + if(!center_turf) // Draw static cam_background.icon_state = "scanline2" cam_background.color = null @@ -464,7 +465,6 @@ GLOBAL_LIST_EMPTY(gateway_destinations) cam_background.add_filter("portal_blur", 1, list("type" = "blur", "size" = 0.5)) - var/turf/center_turf = our_destination.get_target_turf() vis_contents += block(locate(center_turf.x - 1, center_turf.y - 1, center_turf.z), locate(center_turf.x + 1, center_turf.y + 1, center_turf.z)) cam_background.icon_state = "scanline4" cam_background.color = "#adadff"