Skip to content

Commit

Permalink
Fix nil reference in thumbnail generation (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live authored Jul 4, 2024
1 parent e60dde7 commit 38fe7e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pipelines/_steps/thumbnails/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func Generate(ctx rcontext.RequestContext, mediaRecord *database.DbMedia, width

i, err := thumbnailing.GenerateThumbnail(mediaStream, fixedContentType, width, height, method, animated, ctx)
if err != nil {
if i.Reader != nil {
if i != nil && i.Reader != nil {
err2 := i.Reader.Close()
if err2 != nil {
ctx.Log.Warn("Non-fatal error cleaning up thumbnail stream: ", err2)
Expand Down

0 comments on commit 38fe7e8

Please sign in to comment.