diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-08-29 14:31:27 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-08-29 14:32:01 +0300 |
commit | 839083789a60a58675931aa9eb41404ecff0da08 (patch) | |
tree | 09282f201e5d70e8a8d40c53e786fcdafb30f602 /servers | |
parent | 28c85922b12cb0fa8c2cd1465cbeb0c0d226b880 (diff) |
Fix #10723, a regression from 7a07895
Using @akien-mga's patch
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index 95ac876ec0..cd68c14de8 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -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; } |