From 93fcd4ad49aeda6ea10d691d28f45c5ef97f3af7 Mon Sep 17 00:00:00 2001 From: Eric Leroy-Terquem Date: Thu, 24 Oct 2024 18:13:00 +0200 Subject: [PATCH] fix(image processing): do not uninterlace if no png path --- app/services/uninterlace_service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/services/uninterlace_service.rb b/app/services/uninterlace_service.rb index d4cef3aaf..0ec100e38 100644 --- a/app/services/uninterlace_service.rb +++ b/app/services/uninterlace_service.rb @@ -17,6 +17,7 @@ class UninterlaceService end def interlaced?(png_path) + return false if png_path.blank? png = MiniMagick::Image.open(png_path) png.data["interlace"] != "None" end