From: Cristy Date: Fri, 21 Jun 2019 20:51:38 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/1608 X-Git-Tag: 7.0.8-50~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7759f410b773a1dd57b0e1fb28112e1cd8b97bc;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1608 --- diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c index a3bb96a21..f9412bb52 100644 --- a/MagickCore/threshold.c +++ b/MagickCore/threshold.c @@ -212,6 +212,8 @@ MagickExport Image *AdaptiveThresholdImage(const Image *image, threshold_image=CloneImage(image,0,0,MagickTrue,exception); if (threshold_image == (Image *) NULL) return((Image *) NULL); + if (width == 0) + return(threshold_image); status=SetImageStorageClass(threshold_image,DirectClass,exception); if (status == MagickFalse) {