[libpng16] Allow compresion-type to be NULL in png_set_iCCP().
diff --git a/pngget.c b/pngget.c
index 5c435dc..b888db3 100644
--- a/pngget.c
+++ b/pngget.c
@@ -749,7 +749,8 @@
       /* This is somewhat irrelevant since the profile data returned has
        * actually been uncompressed.
        */
-      *compression_type = PNG_COMPRESSION_TYPE_BASE;
+      if (compression_type != NULL)
+         *compression_type = PNG_COMPRESSION_TYPE_BASE;
       return (PNG_INFO_iCCP);
    }