Skip to content

Commit 62cff66

Browse files
committed
Don't recursively call _update_tree
When a node was previously selected and the test "selected == p_node" was true the code would use set_selected() to change the selection to nullptr. However, if the tree is dirty, which is always true in this codepath, this would lead to a recursive call to _update_tree() ultimately leading to a crash due to us running out of stack. This fixes #100666
1 parent 89001f9 commit 62cff66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

editor/gui/scene_tree_editor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ void SceneTreeEditor::_update_node_subtree(Node *p_node, TreeItem *p_parent, boo
369369
item->set_selectable(0, false);
370370
item->deselect(0);
371371
if (selected == p_node) {
372-
set_selected(nullptr, false);
372+
selected = nullptr;
373373
}
374374
}
375375
}

0 commit comments

Comments
 (0)