mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
svg_loader: multiple composition memory leak
Multiple composition are still not supported, but this patch fixes a memory leak if it is tried to be applied.
This commit is contained in:
parent
6a09a8f015
commit
99263d54d1
1 changed files with 5 additions and 1 deletions
|
@ -869,7 +869,11 @@ static void _handleClipPathAttr(TVG_UNUSED SvgLoaderData* loader, SvgNode* node,
|
|||
#endif
|
||||
style->comp.method = CompositeMethod::ClipPath;
|
||||
int len = strlen(value);
|
||||
if (len >= 3 && !strncmp(value, "url", 3)) style->comp.url = _idFromUrl((const char*)(value + 3));
|
||||
if (len >= 3 && !strncmp(value, "url", 3)) {
|
||||
//FIXME: Support multiple composition.
|
||||
if (style->comp.url) delete(style->comp.url);
|
||||
style->comp.url = _idFromUrl((const char*)(value + 3));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue