Skip to content

Commit f0cb036

Browse files
authored
Merge pull request #3246 from Jack251970/get_thumbnail_exception
Fix Exception When Getting Thumbnails
2 parents 0370c96 + 71f1acd commit f0cb036

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ private static unsafe HBITMAP GetHBitmap(string fileName, int width, int height,
8484
// Fallback to IconOnly if ThumbnailOnly fails
8585
imageFactory.GetImage(size, (SIIGBF)ThumbnailOptions.IconOnly, &hBitmap);
8686
}
87+
catch (FileNotFoundException) when (options == ThumbnailOptions.ThumbnailOnly)
88+
{
89+
// Fallback to IconOnly if files cannot be found
90+
imageFactory.GetImage(size, (SIIGBF)ThumbnailOptions.IconOnly, &hBitmap);
91+
}
8792
}
8893
finally
8994
{

0 commit comments

Comments
 (0)