Don't log error if there is no selection upon handling item_icon_double_clicked signal
This commit is contained in:
parent
04249468d3
commit
42b14ce186
1 changed files with 4 additions and 1 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue