From ebc9d2ca2596dbb1754254f636b1f3485b819f96 Mon Sep 17 00:00:00 2001 From: Vicente Penades Date: Fri, 28 Apr 2017 23:36:52 +0200 Subject: [PATCH] Replaced assert with DebugGuard --- src/ImageSharp/PixelFormats/PorterDuffFunctions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp/PixelFormats/PorterDuffFunctions.cs b/src/ImageSharp/PixelFormats/PorterDuffFunctions.cs index f3717f8f8f..1c9f6b8425 100644 --- a/src/ImageSharp/PixelFormats/PorterDuffFunctions.cs +++ b/src/ImageSharp/PixelFormats/PorterDuffFunctions.cs @@ -244,7 +244,7 @@ namespace ImageSharp.PixelFormats [MethodImpl(MethodImplOptions.AggressiveInlining)] private static TBckPixel Compose(Vector4 backdrop, Vector4 source, Vector4 xform) { - System.Diagnostics.Debug.Assert(source.W > 0, nameof(source) + " Alpha must be non zero"); + DebugGuard.MustBeGreaterThan(source.W, 0, nameof(source.W)); // calculate weights float xw = backdrop.W * source.W;