Fix #10723, a regression from 7a07895

Using @akien-mga's patch
This commit is contained in:
Bojidar Marinov 2017-08-29 14:31:27 +03:00
parent 28c85922b1
commit 839083789a
No known key found for this signature in database
GPG key ID: 4D546A8F1E091856

View file

@ -1473,9 +1473,10 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
//check shadow..
if (light && p_shadow_atlas.is_valid() && VSG::storage->light_has_shadow(E->get()->base)) {
lights_with_shadow[directional_shadow_count++] = E->get();
if (light) {
if (p_shadow_atlas.is_valid() && VSG::storage->light_has_shadow(E->get()->base)) {
lights_with_shadow[directional_shadow_count++] = E->get();
}
//add to list
directional_light_ptr[directional_light_count++] = light->instance;
}