diff options
Diffstat (limited to 'scene/3d/gi_probe.cpp')
-rw-r--r-- | scene/3d/gi_probe.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 444036de3a..66364d40f9 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -1097,7 +1097,8 @@ void GIProbe::_find_meshes(Node *p_at_node, Baker *p_baker) { } } - if (Spatial *s = Object::cast_to<Spatial>(p_at_node)) { + Spatial *s = Object::cast_to<Spatial>(p_at_node); + if (s) { if (s->is_visible_in_tree()) { |