diff --git a/source/WinFormApp/Util.cs b/source/WinFormApp/Util.cs index 3c8b044..f50dae6 100644 --- a/source/WinFormApp/Util.cs +++ b/source/WinFormApp/Util.cs @@ -7160,6 +7160,10 @@ At first I was happy to find your code that solved my problem, but I did not lik //extract one selected by index icon from a file. public static Icon IconFromFile(string Filename, IconSize Size, int Index) { + + //case 3751 + if (!File.Exists(Filename)) return null; + int IconCount = ExtractIconEx(Filename, -1, null, null, 0); //checks how many icons. if (IconCount < Index) return null; // no icons was found.