Skip to content

Commit

Permalink
Moved check for empty collection to the TemporaryImageAttacher class …
Browse files Browse the repository at this point in the history
…an added new method to replace the images in the collection with a new list.
  • Loading branch information
dlemstra committed Apr 6, 2024
1 parent 7f050ae commit cebab1b
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 357 deletions.
3 changes: 3 additions & 0 deletions src/Magick.NET/Helpers/TemporaryImageAttacher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ internal sealed class TemporaryImageAttacher : IDisposable

public TemporaryImageAttacher(List<IMagickImage<QuantumType>> images)
{
if (images.Count == 0)
throw new InvalidOperationException("Operation requires at least one image.");

_images = images;
AttachImages();
}
Expand Down
Loading

0 comments on commit cebab1b

Please sign in to comment.