From d97d2a3bacab7c39a427c8f0839fb894bd4e4d60 Mon Sep 17 00:00:00 2001 From: MrPerson Date: Mon, 12 Oct 2015 01:52:30 -0700 Subject: [PATCH] Disallow nulls in the lighting system's lights list This bug isn't reproducable so no, I'm not sure this will fix it. It's still a good idea to do this though. Best guess as to what happened: A light was deleted pre-round for some reason. The garbage ss del()'d the light before the lighting system's first tick, so a null got into the lighting ss's lights list. This broke the whole system directly from roundstart and caused the thousands of "can't run null.check()" runtime errors from yesterday. --- code/modules/lighting/lighting_system.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/lighting/lighting_system.dm b/code/modules/lighting/lighting_system.dm index 9a97bc52b5b..a8fe3cc34d8 100644 --- a/code/modules/lighting/lighting_system.dm +++ b/code/modules/lighting/lighting_system.dm @@ -58,6 +58,8 @@ remove_effect() owner.light = null owner = null + if(changed) + SSlighting.changed_lights -= src return ..() //Check a light to see if its effect needs reprocessing. If it does, remove any old effect and create a new one