From 654552cf731ddc7039542a79f5b1f0b015bcddb0 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 8 Aug 2025 08:54:41 +1200 Subject: [PATCH] Guard against predefined in recompress_frames --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index c74c2d16..d11c3ae3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -632,6 +632,8 @@ fn recompress_frames( if !opts.idat_recoding || png.frames.is_empty() { return Ok(()); } + // Ensure we don't try to recompress frames with a predefined filter + debug_assert!(!matches!(filter, FilterStrategy::Predefined { .. })); png.frames .par_iter_mut() .with_max_len(1)