mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 22:47:49 +02:00
Fixed possible crash.
This commit is contained in:
parent
be940493cc
commit
a679b6f828
1 changed files with 3 additions and 1 deletions
|
@ -550,7 +550,9 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext,
|
||||||
|
|
||||||
if (lightStage && lightStage->_currentFrame._sunLights.size()) {
|
if (lightStage && lightStage->_currentFrame._sunLights.size()) {
|
||||||
graphics::LightPointer keyLight = lightStage->getLight(lightStage->_currentFrame._sunLights.front());
|
graphics::LightPointer keyLight = lightStage->getLight(lightStage->_currentFrame._sunLights.front());
|
||||||
keyLightCastShadows = keyLight->getCastShadows();
|
if (keyLight) {
|
||||||
|
keyLightCastShadows = keyLight->getCastShadows();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deferredLightingEffect->_shadowMapEnabled && keyLightCastShadows) {
|
if (deferredLightingEffect->_shadowMapEnabled && keyLightCastShadows) {
|
||||||
|
|
Loading…
Reference in a new issue