Skip to content

Commit

Permalink
check for NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Nov 11, 2022
1 parent 381d6f0 commit eda2e46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MagickCore/layer.c
Expand Up @@ -338,7 +338,8 @@ MagickExport Image *CoalesceImages(const Image *image,ExceptionInfo *exception)
Next image is the dispose image, overlaid with next frame in sequence.
*/
coalesce_image->next=CloneImage(dispose_image,0,0,MagickTrue,exception);
coalesce_image->next->previous=coalesce_image;
if (coalesce_image->next != (Image *) NULL)
coalesce_image->next->previous=coalesce_image;
previous=coalesce_image;
coalesce_image=GetNextImageInList(coalesce_image);
coalesce_image->background_color.alpha_trait=BlendPixelTrait;
Expand Down

0 comments on commit eda2e46

Please sign in to comment.