Don't log error if there is no selection upon handling item_icon_double_clicked signal

This commit is contained in:
Frank Becker 2026-01-24 15:22:08 -08:00
parent 04249468d3
commit 42b14ce186

View file

@ -4199,7 +4199,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"));