diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index a593a92b97e..b475eee9204 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -514,7 +514,7 @@ void SpatialEditorViewport::_select_region() { for (int i = 0; i < instances.size(); i++) { Spatial *sp = Object::cast_to(ObjectDB::get_instance(instances[i])); - if (!sp && _is_node_locked(sp)) + if (!sp || _is_node_locked(sp)) continue; Node *item = Object::cast_to(sp);