if (SyncAuthenticPixels(image,exception) == MagickFalse)
break;
- if (image->colors != 0 && image->colors <= 256)
+ if (image_colors != 0 && image_colors <= 256 &&
+ image->colormap != NULL)
for (i=0; i<image_colors; i++)
image->colormap[i].opacity =
image->colormap[i].opacity > OpaqueOpacity/2 ? 0 :
* quantization of the pixels and background color to the 3-3-2
* palette.
*/
- if (image_colors == 0 || image_colors > 256)
+ if (image_colors != 0 && image_colors <= 256 &&
+ image->colormap != NULL)
{
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
break;
}
- if (image_colors != 0 && image_colors <= 256)
+ if (image_colors != 0 && image_colors <= 256 &&
+ image->colormap != NULL)
{
if (logging != MagickFalse)
(void) LogMagickEvent(CoderEvent,GetMagickModule(),