Skip to content

Commit

Permalink
Merge pull request #93404 from TokisanGames/fix-empty-scene-crash
Browse files Browse the repository at this point in the history
Fix crash in Node3DEditorViewport selecting on empty scene
  • Loading branch information
akien-mga committed Jul 31, 2024
2 parents 8d9a394 + 1780f28 commit e2be29c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions editor/plugins/node_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,9 @@ void Node3DEditorViewport::_select_region() {
Vector<Node *> selected;

Node *edited_scene = get_tree()->get_edited_scene_root();
if (edited_scene == nullptr) {
return;
}

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

0 comments on commit e2be29c

Please sign in to comment.