Merge pull request #115347 from mooflu/err-113332

Scene tree dock: Don't log error if there is no selection upon handling item_icon_double_clicked signal
This commit is contained in:
Rémi Verschelde 2026-02-02 10:10:30 +01:00
commit affa84862a
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -4189,7 +4189,10 @@ void SceneTreeDock::save_branch_to_file(const String &p_directory) {
void SceneTreeDock::_focus_node() {
Node *node = scene_tree->get_selected();
ERR_FAIL_NULL(node);
// This method handles the item_icon_double_clicked signal and there is no guarantee anything is actually selected.
if (!node) {
return;
}
if (node->is_class("CanvasItem")) {
CanvasItemEditorPlugin *editor = Object::cast_to<CanvasItemEditorPlugin>(editor_data->get_editor_by_name("2D"));