From e247749424d3be05b70857968588d5b60310b811 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Wed, 16 Jun 2021 15:54:12 +0200 Subject: [PATCH] svg_loader: adding check if stroke-dasharray attribute != none The stroke-dasharray value equal to "none" was causing a segfault during a conversion to float. Fixed now. --- src/loaders/svg/tvgSvgLoader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/loaders/svg/tvgSvgLoader.cpp b/src/loaders/svg/tvgSvgLoader.cpp index 175fb20..6f0bcb6 100644 --- a/src/loaders/svg/tvgSvgLoader.cpp +++ b/src/loaders/svg/tvgSvgLoader.cpp @@ -236,6 +236,8 @@ _PARSE_TAG(SvgFillRule, fillRule, FillRule, fillRuleTags, SvgFillRule::Winding) static inline void _parseDashArray(const char *str, SvgDash* dash) { + if (!strncmp(str, "none", 4)) return; + char *end = nullptr; while (*str) { -- 2.7.4