assert(image->signature == MagickSignature);
assert(image->cache != (Cache) NULL);
cache_info=(CacheInfo *) GetImagePixelCache(image,MagickTrue,exception);
- assert(cache_info->signature == MagickSignature);
if (cache_info == (Cache) NULL)
return((Quantum *) NULL);
+ assert(cache_info->signature == MagickSignature);
if ((cache_info->columns == 0) && (cache_info->rows == 0))
{
(void) ThrowMagickException(exception,GetMagickModule(),CacheError,
*/
(void) CopyMagickString(montage->filename,montage_info->filename,
MaxTextExtent);
- montage->columns=bounds.width;
- montage->rows=bounds.height;
+ montage->columns=MagickMax(bounds.width,1);
+ montage->rows=MagickMax(bounds.height,1);
(void) SetImageBackgroundColor(montage);
/*
Set montage geometry.