mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 22:58:44 +00:00
svg_loader: Add nullptr check.
Signed-off-by: jykeon <jykeon@samsung.com>
This commit is contained in:
parent
e83a47b4c6
commit
bfaf26d99e
1 changed files with 2 additions and 0 deletions
|
@ -1691,6 +1691,8 @@ static SvgStyleGradient* _cloneGradient(SvgStyleGradient* from)
|
|||
if (!from) return nullptr;
|
||||
|
||||
auto grad = (SvgStyleGradient*)(calloc(1, sizeof(SvgStyleGradient)));
|
||||
if (!grad) return nullptr;
|
||||
|
||||
grad->type = from->type;
|
||||
grad->id = from->id ? _copyId(from->id) : nullptr;
|
||||
grad->ref = from->ref ? _copyId(from->ref) : nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue