From e90afbec0edac4374d9bf2f84e14017dd0d5c4b8 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 2 Jan 2017 19:10:34 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/340 --- MagickCore/image.c | 4 ++-- coders/png.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) 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. -- 2.40.0