From 3fd58ce46f4a731043e5b7ccf81400d5f60f9a35 Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 1 May 2018 19:13:17 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1119 --- coders/png.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/png.c b/coders/png.c index f70eed4ec..55f1734d0 100644 --- a/coders/png.c +++ b/coders/png.c @@ -4732,7 +4732,7 @@ static Image *ReadOneJNGImage(MngInfo *mng_info, (void) LogMagickEvent(CoderEvent,GetMagickModule(), " Copying JDAT chunk data to color_blob."); - if (length != 0) + if ((length != 0) && (color_image != (Image *) NULL)) { (void) WriteBlob(color_image,length,chunk); chunk=(unsigned char *) RelinquishMagickMemory(chunk); -- 2.40.0