From 7e62e6612a12c867d7b1a85f4bc78169aa1d8b50 Mon Sep 17 00:00:00 2001 From: xTrainx Date: Fri, 6 Sep 2024 20:24:31 -0400 Subject: [PATCH] fix loading away mission exploding the server --- code/controllers/subsystem/nightcycle.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/subsystem/nightcycle.dm b/code/controllers/subsystem/nightcycle.dm index 359185bb9ef..96b29f0bf55 100644 --- a/code/controllers/subsystem/nightcycle.dm +++ b/code/controllers/subsystem/nightcycle.dm @@ -190,7 +190,7 @@ SUBSYSTEM_DEF(nightcycle) luminosity = 1 for(var/dir in GLOB.alldirs) var/turf/neighbor = get_step(src, dir) - if(!neighbor || neighbor.sunlight_state != NO_SUNLIGHT) + if(!neighbor || neighbor?.sunlight_state && neighbor?.sunlight_state != NO_SUNLIGHT) continue neighbor.sunlight_state = SUNLIGHT_BORDER if(neighbor.flags_1 & INITIALIZED_1)