mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
svg_loader: prevent dangling node in exception case.
We prefer the independent unit function behavior.
This commit is contained in:
parent
3018fe29cd
commit
b40016c81d
1 changed files with 1 additions and 1 deletions
|
@ -1448,7 +1448,7 @@ static void _copyAttr(SvgNode* to, SvgNode* from)
|
|||
static void _cloneNode(SvgNode* from, SvgNode* parent)
|
||||
{
|
||||
SvgNode* newNode;
|
||||
if (!from) return;
|
||||
if (!from || !parent) return;
|
||||
|
||||
newNode = _createNode(parent, from->type);
|
||||
_copyAttr(newNode, from);
|
||||
|
|
Loading…
Add table
Reference in a new issue