Fixed possible crash.

This commit is contained in:
Nissim Hadar 2018-02-14 21:15:29 -08:00
parent 12f4b8dbb1
commit 26e7a85a95

View file

@ -386,6 +386,10 @@ void RenderShadowCascadeSetup::run(const render::RenderContextPointer& renderCon
assert(lightStage);
// Exit if current keylight does not cast shadows
if (!lightStage->getCurrentKeyLight()) {
return;
}
bool castShadows = lightStage->getCurrentKeyLight()->getCastShadows();
if (!castShadows) {
output.edit0() = ItemFilter::Builder::nothing();