From 86a3c4fb143a789ebdae60f477603d39d06b78c8 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sun, 3 Jul 2016 10:26:38 -0500 Subject: [PATCH] [libpng17] Don't call png_icc_set_sRGB() when it's not compiled. --- pngrutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pngrutil.c b/pngrutil.c index 6a14b4ed1..223cf75bd 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1318,12 +1318,12 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr) png_crc_finish(png_ptr, length); finished = 1; -# ifdef PNG_sRGB_SUPPORTED +# if defined(PNG_sRGB_SUPPORTED) && PNG_sRGB_PROFILE_CHECKS >= 0 /* Check for a match against sRGB */ png_icc_set_sRGB(png_ptr, &png_ptr->colorspace, profile, png_ptr->zstream.adler); -# endif +# endif /* Steal the profile for info_ptr. */ if (info_ptr != NULL)