diff --git a/src/Umbraco.Web.BackOffice/Services/IconService.cs b/src/Umbraco.Web.BackOffice/Services/IconService.cs index 0f3fcbec98..ac7ae2455e 100644 --- a/src/Umbraco.Web.BackOffice/Services/IconService.cs +++ b/src/Umbraco.Web.BackOffice/Services/IconService.cs @@ -198,7 +198,7 @@ public class IconService : IIconService // Iterate though the files of the second level sub directory. This should be where the SVG files are located :D foreach (IFileInfo file in fileProvider.GetDirectoryContents($"{path}/{pluginDirectory.Name}/{subDir1.Name}/{subDir2.Name}")) { - if (file.Name.InvariantEndsWith(".svg")) + if (file.Name.InvariantEndsWith(".svg") && file.PhysicalPath != null) { yield return new FileInfo(file.PhysicalPath); }