Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/1119
  • Loading branch information
Cristy committed May 1, 2018
1 parent 811929f commit 1007b98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coders/png.c
Expand Up @@ -4584,7 +4584,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);
Expand Down

0 comments on commit 1007b98

Please sign in to comment.