svg_loader: fill and stroke paiint url were copied twice

The url were copied in the _copyAttr and in the _styleCopy
functions.
This commit is contained in:
Mira Grudzinska 2022-08-28 23:45:29 +02:00 committed by Hermet Park
parent e36368c40c
commit 092a53b0aa

View file

@ -1992,8 +1992,6 @@ static void _copyAttr(SvgNode* to, const SvgNode* from)
//Copy style attribute //Copy style attribute
_styleCopy(to->style, from->style); _styleCopy(to->style, from->style);
to->style->flags = (SvgStyleFlags)((int)to->style->flags | (int)from->style->flags); to->style->flags = (SvgStyleFlags)((int)to->style->flags | (int)from->style->flags);
if (from->style->fill.paint.url) to->style->fill.paint.url = strdup(from->style->fill.paint.url);
if (from->style->stroke.paint.url) to->style->stroke.paint.url = strdup(from->style->stroke.paint.url);
if (from->style->clipPath.url) to->style->clipPath.url = strdup(from->style->clipPath.url); if (from->style->clipPath.url) to->style->clipPath.url = strdup(from->style->clipPath.url);
if (from->style->mask.url) to->style->mask.url = strdup(from->style->mask.url); if (from->style->mask.url) to->style->mask.url = strdup(from->style->mask.url);