Commit 783af7c3d for imagemagick.org
commit 783af7c3dda52ae62d552103e90b0447fe4771a4
Author: Cristy <urban-warrior@imagemagick.org>
Date: Tue Feb 3 18:59:25 2026 -0500
https://github.com/ImageMagick/ImageMagick/discussions/8294
diff --git a/MagickWand/operation.c b/MagickWand/operation.c
index c3c6f882a..2246b980e 100644
--- a/MagickWand/operation.c
+++ b/MagickWand/operation.c
@@ -5223,9 +5223,9 @@ static void CLINoImageOperator(MagickCLI *cli_wand,
arg1=AcquireString("-1");
if (IsSceneGeometry(arg1,MagickFalse) == MagickFalse)
CLIWandExceptionBreak(OptionError,"InvalidArgument",option);
- if ( cli_wand->image_list_stack == (CLIStack *) NULL)
- CLIWandExceptionBreak(OptionError,"UnableToCloneImage",option);
- new_images = (Image *)cli_wand->image_list_stack->data;
+ new_images=cli_wand->wand.images;
+ if (cli_wand->image_list_stack != (CLIStack *) NULL)
+ new_images=(Image *) cli_wand->image_list_stack->data;
if (new_images == (Image *) NULL)
CLIWandExceptionBreak(OptionError,"UnableToCloneImage",option);
new_images=CloneImages(new_images,arg1,_exception);