summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-07-19 17:56:35 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-07-19 17:56:35 +0200
commited84c9e506469342bc5d6e03838dce9ea2672437 (patch)
tree23d117025aea28a442998bdc101819c5db03509f
parent9384b6ab0e3c79dde31f64ac52123a4f54b7bde3 (diff)
Don't allow to pass to _is_node_locked function NULL pointer
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index a593a92b97..b475eee920 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<Spatial>(ObjectDB::get_instance(instances[i]));
- if (!sp && _is_node_locked(sp))
+ if (!sp || _is_node_locked(sp))
continue;
Node *item = Object::cast_to<Node>(sp);