Fixed possible crash.

This commit is contained in:
Nissim Hadar 2018-02-15 11:51:06 -08:00
parent 777862f253
commit df7a8389b3

View file

@ -121,8 +121,7 @@ void RenderShadowMap::run(const render::RenderContextPointer& renderContext, con
assert(lightStage);
// Exit if current keylight does not cast shadows
bool castShadows = lightStage->getCurrentKeyLight()->getCastShadows();
if (!castShadows) {
if (!lightStage->getCurrentKeyLight() || !lightStage->getCurrentKeyLight()->getCastShadows()) {
return;
}