diff --git a/src/Core/src/Graphics/PaintExtensions.cs b/src/Core/src/Graphics/PaintExtensions.cs index 4a3e1602d397..7da39c04738c 100644 --- a/src/Core/src/Graphics/PaintExtensions.cs +++ b/src/Core/src/Graphics/PaintExtensions.cs @@ -28,7 +28,7 @@ public static bool IsNullOrEmpty([NotNullWhen(true)] this Paint? paint) return solidPaint is null || solidPaint.Color is null; if (paint is GradientPaint gradientPaint) - return gradientPaint is null || gradientPaint.GradientStops.Length == 0 || (gradientPaint.StartColor is null && gradientPaint.EndColor is null); + return gradientPaint is null || gradientPaint.GradientStops.Length == 0 || gradientPaint.StartColor is null || gradientPaint.EndColor is null; if (paint is ImagePaint imagePaint) return imagePaint is null || imagePaint.Image is null;