mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
loader/lottie: fix a invalid matte source access.
parser ignored a matte source has no target. this fixes the corner case.
This commit is contained in:
parent
78b14aecb4
commit
1bcbac71ab
1 changed files with 7 additions and 2 deletions
|
@ -1074,8 +1074,13 @@ LottieLayer* LottieParser::parseLayers()
|
|||
root->children.push(layer);
|
||||
} else {
|
||||
//matte source must be located in the right previous.
|
||||
layer->matte.target = static_cast<LottieLayer*>(root->children.last());
|
||||
layer->statical &= layer->matte.target->statical;
|
||||
auto matte = static_cast<LottieLayer*>(root->children.last());
|
||||
if (matte->matteSrc) {
|
||||
layer->matte.target = matte;
|
||||
layer->statical &= layer->matte.target->statical;
|
||||
} else {
|
||||
TVGLOG("LOTTIE", "Matte Source(%s) is not designated?", matte->name);
|
||||
}
|
||||
root->children.last() = layer;
|
||||
}
|
||||
root->statical &= layer->statical;
|
||||
|
|
Loading…
Add table
Reference in a new issue