From da168155f7eeac0b34cc64aee9d7cb1f2fbca525 Mon Sep 17 00:00:00 2001 From: Daniel Luberda Date: Sun, 10 Jun 2018 21:53:59 +0200 Subject: [PATCH] Revert "SVG fix - null exception" This reverts commit a7f33f33bbd0026f920d5d652d958d5673b3c19a. --- source/FFImageLoading.Svg.Shared/SkSvg.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/FFImageLoading.Svg.Shared/SkSvg.cs b/source/FFImageLoading.Svg.Shared/SkSvg.cs index 8b2a73f3b..964bbe822 100644 --- a/source/FFImageLoading.Svg.Shared/SkSvg.cs +++ b/source/FFImageLoading.Svg.Shared/SkSvg.cs @@ -991,7 +991,7 @@ private void ReadPaints(Dictionary 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; @@ -1132,7 +1132,7 @@ private void ReadPaints(Dictionary 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;