summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-19 22:04:33 +0200
committerGitHub <noreply@github.com>2019-07-19 22:04:33 +0200
commit0bf930c1176ed26155aa352b1f937c8ae043272e (patch)
treea97cdd7fb0ed748ae17afbff2e5f1f25178c64cd
parentc317a3ce16a35b21d85b250a0e810526bb89db38 (diff)
parented84c9e506469342bc5d6e03838dce9ea2672437 (diff)
Merge pull request #30692 from qarmin/null_pointer_to_function
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);