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:
commit
affa84862a
1 changed files with 4 additions and 1 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue