mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #3973 from dcog989/bookmark-quick-fix
Bookmark plugin - catch an exception for empty / broken favicons
This commit is contained in:
commit
889ed58f0c
1 changed files with 7 additions and 6 deletions
|
|
@ -106,12 +106,13 @@ public static class FaviconHelper
|
|||
{
|
||||
try
|
||||
{
|
||||
using (var image = SKImage.FromBitmap(bitmap))
|
||||
using (var webp = image.Encode(SKEncodedImageFormat.Webp, 65))
|
||||
{
|
||||
if (webp != null)
|
||||
return webp.ToArray();
|
||||
}
|
||||
using var image = SKImage.FromBitmap(bitmap);
|
||||
if (image is null)
|
||||
return null;
|
||||
|
||||
using var webp = image.Encode(SKEncodedImageFormat.Webp, 65);
|
||||
if (webp != null)
|
||||
return webp.ToArray();
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue