Fix crash when drawing a selection box on an empty scene with certain plugins
This commit is contained in:
parent
6fb3b72756
commit
1780f28407
1 changed files with 3 additions and 0 deletions
|
@ -1043,6 +1043,9 @@ void Node3DEditorViewport::_select_region() {
|
||||||
Vector<Node *> selected;
|
Vector<Node *> selected;
|
||||||
|
|
||||||
Node *edited_scene = get_tree()->get_edited_scene_root();
|
Node *edited_scene = get_tree()->get_edited_scene_root();
|
||||||
|
if (edited_scene == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < instances.size(); i++) {
|
for (int i = 0; i < instances.size(); i++) {
|
||||||
Node3D *sp = Object::cast_to<Node3D>(ObjectDB::get_instance(instances[i]));
|
Node3D *sp = Object::cast_to<Node3D>(ObjectDB::get_instance(instances[i]));
|
||||||
|
|
Loading…
Reference in a new issue