Skip to content

Commit 5773c63

Browse files
committed
fix: handle nil buffer case in resizeImageToBufferWithFFmpegGo
1 parent 5edc9d7 commit 5773c63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/local/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func resizeImageToBufferWithFFmpegGo(inputFile string, width int, outputFormat s
8080
if err != nil {
8181
return nil, fmt.Errorf("ffmpeg-go failed to resize image %s to buffer: %w", inputFile, err)
8282
}
83-
if outBuffer.Len() == 0 {
83+
if outBuffer == nil || outBuffer.Len() == 0 {
8484
return nil, fmt.Errorf("ffmpeg-go produced empty buffer for %s", inputFile)
8585
}
8686

0 commit comments

Comments
 (0)