diff --git a/Wox/ImageLoader/ImageLoader.cs b/Wox/ImageLoader/ImageLoader.cs index 5eccebb2b0..eb9d002665 100644 --- a/Wox/ImageLoader/ImageLoader.cs +++ b/Wox/ImageLoader/ImageLoader.cs @@ -38,6 +38,11 @@ namespace Wox.ImageLoader private static ImageSource GetIcon(string fileName) { + if (System.IO.File.Exists(fileName) == false) + { + return null; + } + Icon icon = GetFileIcon(fileName); if (icon == null) icon = Icon.ExtractAssociatedIcon(fileName);