]> granicus.if.org Git - imagemagick/commitdiff
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=33466
authorCristy <urban-warrior@imagemagick.org>
Sat, 3 Feb 2018 16:35:44 +0000 (11:35 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 3 Feb 2018 16:35:44 +0000 (11:35 -0500)
MagickWand/operation.c

index 76748d703effe49d8dec1901600b153909b7f9e6..4f7e045d87cdcb75af622f0efc6fcbea095c99d8 100644 (file)
@@ -3115,14 +3115,14 @@ static MagickBooleanType CLISimpleOperatorImage(MagickCLI *cli_wand,
         }
       if (LocaleCompare("region",option+1) == 0)
         {
-          if (IsGeometry(arg1) == MagickFalse)
-            CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
           if (*option == '+')
             {
               (void) SetImageRegionMask(_image,WritePixelMask,
                 (const RectangleInfo *) NULL,_exception);
               break;
             }
+          if (IsGeometry(arg1) == MagickFalse)
+            CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
           (void) ParseGravityGeometry(_image,arg1,&geometry,_exception);
           (void) SetImageRegionMask(_image,WritePixelMask,&geometry,_exception);
           break;