Skip to content

Commit

Permalink
Changed condition to work when only one collor is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
mos379 committed Sep 27, 2023
1 parent ce38d97 commit 2ef69de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/src/Graphics/PaintExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2ef69de

Please sign in to comment.