From ed84c9e506469342bc5d6e03838dce9ea2672437 Mon Sep 17 00:00:00 2001 From: qarmin Date: Fri, 19 Jul 2019 17:56:35 +0200 Subject: [PATCH] Don't allow to pass to _is_node_locked function NULL pointer --- editor/plugins/spatial_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);