diff --git a/RainmeterStudio/UI/Controller/IconProvider.cs b/RainmeterStudio/UI/Controller/IconProvider.cs index 1025985d..3fa09dc7 100644 --- a/RainmeterStudio/UI/Controller/IconProvider.cs +++ b/RainmeterStudio/UI/Controller/IconProvider.cs @@ -35,11 +35,13 @@ namespace RainmeterStudio.UI.Controller // Is a file? if (item.TargetKind == Reference.ReferenceTargetKind.File || item.TargetKind == Reference.ReferenceTargetKind.Project) { - if (String.IsNullOrEmpty(Path.GetExtension(item.StoragePath))) + var extension = Path.GetExtension(item.StoragePath); + + if (String.IsNullOrEmpty(extension)) key += "Unknown"; else - key += "_" + Path.GetExtension(item.StoragePath).Substring(1); + key += "_" + extension.Substring(1); } // Not a file, try to figure out if a directory