Normalizes how some lighting things GC

This commit is contained in:
CitadelStationBot
2017-04-18 18:02:20 -05:00
parent 6f0aa809df
commit 53ac3bcb82
5 changed files with 12 additions and 24 deletions

View File

@@ -36,9 +36,9 @@ SUBSYSTEM_DEF(lighting)
for (i in 1 to GLOB.lighting_update_lights.len)
var/datum/light_source/L = GLOB.lighting_update_lights[i]
if (L.check() || L.destroyed || L.force_update)
if (L.check() || QDELETED(L) || L.force_update)
L.remove_lum()
if (!L.destroyed)
if (!QDELETED(L))
L.apply_lum()
else if (L.vis_update) //We smartly update only tiles that became (in) visible to use.