Skip to content

Commit dcf5244

Browse files
YYF233333KoBeWi
andcommitted
Refactor EditorNode get icon.
Co-authored-by: Tomasz Chabora <[email protected]>
1 parent 0b6a717 commit dcf5244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

editor/editor_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4941,7 +4941,7 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
49414941
String script_path;
49424942
if (ScriptServer::is_global_class(p_class)) {
49434943
script_path = ScriptServer::get_global_class_path(p_class);
4944-
} else if (ResourceLoader::exists(p_class)) { // If the script is not a class_name we check if the script resource exists.
4944+
} else if (!p_class.get_extension().is_empty() && ResourceLoader::exists(p_class)) { // If the script is not a class_name we check if the script resource exists.
49454945
script_path = p_class;
49464946
}
49474947

0 commit comments

Comments
 (0)