]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/1608
authorCristy <urban-warrior@imagemagick.org>
Fri, 21 Jun 2019 20:51:38 +0000 (16:51 -0400)
committerCristy <urban-warrior@imagemagick.org>
Fri, 21 Jun 2019 20:51:38 +0000 (16:51 -0400)
MagickCore/threshold.c

index a3bb96a2147c43cb3991ddba5384ccc29efe4443..f9412bb52e50eb229dc41bf4cc2b98157f37c899 100644 (file)
@@ -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)
     {