diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index d05e0b731d5c..01d7a0f534ff 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1961,7 +1961,10 @@ void EditorFileSystem::_update_file_icon_path(EditorFileSystemDirectory::FileInf } if (icon_path.is_empty() && !file_info->type.is_empty()) { - icon_path = EditorNode::get_singleton()->get_class_icon(file_info->type)->get_path(); + Ref icon = EditorNode::get_singleton()->get_class_icon(file_info->type); + if (icon.is_valid()) { + icon_path = icon->get_path(); + } } file_info->icon_path = icon_path;