Skip to content

Commit 1780f28

Browse files
committed
Fix crash when drawing a selection box on an empty scene with certain plugins
1 parent 6fb3b72 commit 1780f28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

editor/plugins/node_3d_editor_plugin.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,9 @@ void Node3DEditorViewport::_select_region() {
10431043
Vector<Node *> selected;
10441044

10451045
Node *edited_scene = get_tree()->get_edited_scene_root();
1046+
if (edited_scene == nullptr) {
1047+
return;
1048+
}
10461049

10471050
for (int i = 0; i < instances.size(); i++) {
10481051
Node3D *sp = Object::cast_to<Node3D>(ObjectDB::get_instance(instances[i]));

0 commit comments

Comments
 (0)