summaryrefslogtreecommitdiff
path: root/png/pngread.c
diff options
context:
space:
mode:
Diffstat (limited to 'png/pngread.c')
-rw-r--r--png/pngread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/png/pngread.c b/png/pngread.c
index 008a41856..07a39df6e 100644
--- a/png/pngread.c
+++ b/png/pngread.c
@@ -568,7 +568,11 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
#endif
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
- if (png_ptr->transformations || png_ptr->num_palette_max >= 0)
+ if (png_ptr->transformations
+# ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
+ || png_ptr->num_palette_max >= 0
+# endif
+ )
png_do_read_transformations(png_ptr, &row_info);
#endif