diff --git a/src/ImageSharp/Configuration.cs b/src/ImageSharp/Configuration.cs index 0d44db8d8..6a436187d 100644 --- a/src/ImageSharp/Configuration.cs +++ b/src/ImageSharp/Configuration.cs @@ -63,9 +63,9 @@ namespace SixLabors.ImageSharp get => this.maxDegreeOfParallelism; set { - if (value <= 0) + if (value == 0 || value < -1) { - throw new ArgumentOutOfRangeException(nameof(this.MaxDegreeOfParallelism)); + throw new ArgumentOutOfRangeException(nameof(MaxDegreeOfParallelism)); } this.maxDegreeOfParallelism = value; @@ -161,4 +161,4 @@ namespace SixLabors.ImageSharp new BmpConfigurationModule()); } } -} \ No newline at end of file +}