mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
lottie: fixed all memory access violations.
This commit is contained in:
parent
d60b5b1721
commit
ae67a126e1
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ LottieImage::~LottieImage()
|
||||||
free(b64Data);
|
free(b64Data);
|
||||||
free(mimeType);
|
free(mimeType);
|
||||||
|
|
||||||
if (PP(picture)->unref() == 0) {
|
if (picture && PP(picture)->unref() == 0) {
|
||||||
delete(picture);
|
delete(picture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ LottieLayer::~LottieLayer()
|
||||||
delete(matte.target);
|
delete(matte.target);
|
||||||
delete(transform);
|
delete(transform);
|
||||||
|
|
||||||
if (cache.scene && PP(cache.scene)->unref() == 0) delete(cache.scene);
|
if (cache.scene) delete(cache.scene);
|
||||||
if (cache.clipper && PP(cache.clipper)->unref() == 0) delete(cache.clipper);
|
if (cache.clipper && PP(cache.clipper)->unref() == 0) delete(cache.clipper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue