diff --git a/src/ImageSharp/Image.FromStream.cs b/src/ImageSharp/Image.FromStream.cs index 1621724b0d..e882bf2f8d 100644 --- a/src/ImageSharp/Image.FromStream.cs +++ b/src/ImageSharp/Image.FromStream.cs @@ -292,7 +292,10 @@ namespace SixLabors.ImageSharp /// Image contains invalid content. /// A new . public static Image Load(Configuration configuration, Stream stream, IImageDecoder decoder) - => WithSeekableStream(configuration, stream, s => decoder.Decode(configuration, s)); + { + Guard.NotNull(decoder, nameof(decoder)); + return WithSeekableStream(configuration, stream, s => decoder.Decode(configuration, s)); + } /// /// Decode a new instance of the class from the given stream. @@ -327,7 +330,7 @@ namespace SixLabors.ImageSharp /// The stream is not readable. /// Image format not recognised. /// Image contains invalid content. - /// A new .> + /// A new . public static Image Load(Configuration configuration, Stream stream) => Load(configuration, stream, out _); /// diff --git a/tests/ImageSharp.Benchmarks/General/IO/BufferedReadStreamWrapper.cs b/tests/ImageSharp.Benchmarks/General/IO/BufferedReadStreamWrapper.cs index 76a48af211..baabb4784b 100644 --- a/tests/ImageSharp.Benchmarks/General/IO/BufferedReadStreamWrapper.cs +++ b/tests/ImageSharp.Benchmarks/General/IO/BufferedReadStreamWrapper.cs @@ -1,4 +1,4 @@ -// Copyright (c) Six Labors and contributors. +// Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. using System;