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.
This commit is contained in:
Mira Grudzinska 2021-06-16 15:54:12 +02:00 committed by JunsuChoi
parent 858de0febb
commit e0a1aa9355

View file

@ -236,6 +236,8 @@ _PARSE_TAG(SvgFillRule, fillRule, FillRule, fillRuleTags, SvgFillRule::Winding)
static inline void static inline void
_parseDashArray(const char *str, SvgDash* dash) _parseDashArray(const char *str, SvgDash* dash)
{ {
if (!strncmp(str, "none", 4)) return;
char *end = nullptr; char *end = nullptr;
while (*str) { while (*str) {