From 1b11f7ddeab23e1d21a3920561fa97fc43ec7e77 Mon Sep 17 00:00:00 2001 From: goliath Date: Wed, 18 Oct 2023 13:03:00 +0300 Subject: [PATCH] fix(light): don't process deleted lights --- code/controllers/subsystems/lighting.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/controllers/subsystems/lighting.dm b/code/controllers/subsystems/lighting.dm index ef0e443bace..6b57873b88f 100644 --- a/code/controllers/subsystems/lighting.dm +++ b/code/controllers/subsystems/lighting.dm @@ -82,6 +82,9 @@ SUBSYSTEM_DEF(lighting) for(i in 1 to length(queue)) var/datum/light_source/L = queue[i] + if(QDELETED(L)) + continue + if(L.check() || L.destroyed || L.force_update) L.remove_lum() if(!L.destroyed) @@ -113,6 +116,9 @@ SUBSYSTEM_DEF(lighting) for(i in 1 to length(queue)) var/datum/lighting_corner/C = queue[i] + if(QDELETED(L)) + continue + C.needs_update = FALSE C.update_overlays()