From e8254dc3f4a72bae094711a5a07fdad63df85e62 Mon Sep 17 00:00:00 2001 From: matheusmdx Date: Mon, 19 Aug 2024 16:16:06 -0300 Subject: [PATCH] Fallback to theme icon when no custom icon is set in autocompletion --- editor/code_editor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index d24b1edd709..8664c167b58 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -994,6 +994,9 @@ Ref CodeTextEditor::_get_completion_icon(const ScriptLanguage::CodeCo tex = get_editor_theme_icon(p_option.display); } else { tex = EditorNode::get_singleton()->get_class_icon(p_option.display); + if (!tex.is_valid()) { + tex = get_editor_theme_icon(SNAME("Object")); + } } } break; case ScriptLanguage::CODE_COMPLETION_KIND_ENUM: