Don't allow to pass to _is_node_locked function NULL pointer

This commit is contained in:
qarmin 2019-07-19 17:56:35 +02:00
parent 9384b6ab0e
commit ed84c9e506

View file

@ -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);