diff options
Diffstat (limited to 'tools/editor/plugins/shader_editor_plugin.cpp')
-rw-r--r-- | tools/editor/plugins/shader_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp index 65b5365b50..18d8f5efc0 100644 --- a/tools/editor/plugins/shader_editor_plugin.cpp +++ b/tools/editor/plugins/shader_editor_plugin.cpp @@ -234,7 +234,7 @@ void ShaderEditor::_tab_changed(int p_which) { ShaderTextEditor *shader_editor = tab_container->get_tab_control(p_which)->cast_to<ShaderTextEditor>(); - if (shader_editor) + if (shader_editor && is_inside_tree()) shader_editor->get_text_edit()->grab_focus(); ensure_select_current(); |