lottie: safety++

Don't apply matte — it's already been pushed into the scene.
This is a corner-case bug that occurs when the Lottie data
violates the specification.
This commit is contained in:
Hermet Park 2025-03-26 20:08:49 +09:00 committed by Mira Grudzinska
parent 7d8bb168d2
commit 4e5ff3ea9a

View file

@ -1510,7 +1510,6 @@ void LottieBuilder::updateLayer(LottieComposition* comp, Scene* scene, LottieLay
updateEffect(layer, frameNo); updateEffect(layer, frameNo);
//the given matte source was composited by the target earlier.
if (!layer->matteSrc) scene->push(cast(layer->scene)); if (!layer->matteSrc) scene->push(cast(layer->scene));
} }
@ -1600,6 +1599,7 @@ static bool _buildComposition(LottieComposition* comp, LottieLayer* parent)
} }
if (child->matteTarget) { if (child->matteTarget) {
child->matteTarget->matteSrc = true;
//parenting //parenting
_buildHierarchy(parent, child->matteTarget); _buildHierarchy(parent, child->matteTarget);
//precomp referencing //precomp referencing