1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Guard against a potential null dereference

This commit is contained in:
jvoisin 2025-01-20 16:16:19 +01:00 committed by Frédéric Guillot
parent 8889e44b5d
commit abfd9306a4

View file

@ -222,7 +222,7 @@ func resizeIcon(icon *model.Icon) *model.Icon {
case "image/gif":
src, err = gif.Decode(r)
}
if err != nil {
if err != nil || src == nil {
slog.Warn("unable to decode the icon", slog.Any("error", err))
return icon
}