mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
svg_loader: fixing finding defs node
In the case when a 'use' node was used in a 'defs' block and the element it referenced was also defined within the same 'defs' block, the reference node could not be cloned. This was because the 'defs' node could not be located. @Issue: https://github.com/thorvg/thorvg/issues/1451
This commit is contained in:
parent
40ef9031ba
commit
2cfa5505c3
1 changed files with 1 additions and 0 deletions
|
@ -1903,6 +1903,7 @@ static SvgNode* _getDefsNode(SvgNode* node)
|
|||
}
|
||||
|
||||
if (node->type == SvgNodeType::Doc) return node->node.doc.defs;
|
||||
if (node->type == SvgNodeType::Defs) return node;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue