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

index f9412bb52e50eb229dc41bf4cc2b98157f37c899..0c3a488d7e322f6d71b954f521e8036dd057e05c 100644 (file)
@@ -212,7 +212,7 @@ 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)
+  if ((width == 0) || (height == 0))
     return(threshold_image);
   status=SetImageStorageClass(threshold_image,DirectClass,exception);
   if (status == MagickFalse)