Skip to content

Commit

Permalink
Revert "SVG fix - null exception"
Browse files Browse the repository at this point in the history
This reverts commit a7f33f3.
  • Loading branch information
daniel-luberda committed Jun 10, 2018
1 parent a7f33f3 commit da16815
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/FFImageLoading.Svg.Shared/SkSvg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ private void ReadPaints(Dictionary<string, string> style, ref SKPaint strokePain
if (ColorHelper.TryParse(stroke, out SKColor color))
{
// preserve alpha
if (color.Alpha == 255 && (fillPaint == null || fillPaint.Color.Alpha > 0))
if (color.Alpha == 255 && fillPaint.Color.Alpha > 0)
strokePaint.Color = color.WithAlpha(strokePaint.Color.Alpha);
else
strokePaint.Color = color;
Expand Down Expand Up @@ -1132,7 +1132,7 @@ private void ReadPaints(Dictionary<string, string> style, ref SKPaint strokePain
if (ColorHelper.TryParse(fill, out SKColor color))
{
// preserve alpha
if (color.Alpha == 255 && (fillPaint == null || fillPaint.Color.Alpha > 0))
if (color.Alpha == 255 && fillPaint.Color.Alpha > 0)
fillPaint.Color = color.WithAlpha(fillPaint.Color.Alpha);
else
fillPaint.Color = color;
Expand Down

0 comments on commit da16815

Please sign in to comment.