From f25dadbaf2aba71cb372163e5addee06d3204135 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 16 Sep 2019 17:34:41 +0200 Subject: [PATCH] - fixed: sector lights could access the sector before it was set. --- src/g_shared/a_dynlight.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_shared/a_dynlight.cpp b/src/g_shared/a_dynlight.cpp index c2bec41cd..c1bf95c42 100644 --- a/src/g_shared/a_dynlight.cpp +++ b/src/g_shared/a_dynlight.cpp @@ -372,7 +372,7 @@ void FDynamicLight::Tick() if (scale == 0.f) scale = 1.f; - intensity = Sector->lightlevel * scale; + intensity = Sector? Sector->lightlevel * scale : 0; intensity = clamp(intensity, 0.f, 255.f); m_currentRadius = intensity;