mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-25 07:39:02 +00:00
svg_loader SvgLoader: Copy the missing composite url
When copying an attribute, url information of stype's composite is overwritten with memcpy. This causes double free by deleting the wrong string in freeNodeStyle.
This commit is contained in:
parent
234c1cefc8
commit
f20ef0dc15
1 changed files with 3 additions and 0 deletions
|
@ -1587,6 +1587,9 @@ static void _copyAttr(SvgNode* to, const SvgNode* from)
|
|||
//Copy style attribute;
|
||||
memcpy(to->style, from->style, sizeof(SvgStyleProperty));
|
||||
|
||||
//Copy style composite attribute (clip-path, mask, ...)
|
||||
if (from->style->comp.url) to->style->comp.url = new string(from->style->comp.url->c_str());
|
||||
|
||||
//Copy node attribute
|
||||
switch (from->type) {
|
||||
case SvgNodeType::Circle: {
|
||||
|
|
Loading…
Add table
Reference in a new issue