From: Cristy Date: Tue, 3 Jan 2017 00:10:34 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/340 X-Git-Tag: 7.0.4-2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e90afbec0edac4374d9bf2f84e14017dd0d5c4b8;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/340 --- diff --git a/MagickCore/image.c b/MagickCore/image.c index e6796b7db..6cf47ce13 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -3678,9 +3678,9 @@ MagickExport MagickBooleanType SyncImage(Image *image,ExceptionInfo *exception) if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(image->signature == MagickCoreSignature); - if ((image->storage_class != PseudoClass) || - (image->colormap == (PixelInfo *) NULL)) + if (image->storage_class != PseudoClass) return(MagickFalse); + assert(image->colormap != (PixelInfo *) NULL); range_exception=MagickFalse; status=MagickTrue; taint=image->taint; diff --git a/coders/png.c b/coders/png.c index 8661ca868..23bdb54bc 100644 --- a/coders/png.c +++ b/coders/png.c @@ -2996,8 +2996,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, } } - if ((image->storage_class == PseudoClass) && - (image_info->ping == MagickFalse)) + if (image->storage_class == PseudoClass) { /* Initialize image colormap.