mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-11 07:02:31 +00:00
lottie: fix access violation while updating
Fix access issue when iterating over children in case of an empty container. @Issue: https://github.com/thorvg/thorvg/issues/2283
This commit is contained in:
parent
ebc37a0f12
commit
5183cf6737
1 changed files with 2 additions and 0 deletions
|
@ -1283,6 +1283,8 @@ static bool _buildComposition(LottieComposition* comp, LottieGroup* parent)
|
|||
|
||||
bool LottieBuilder::update(LottieComposition* comp, float frameNo)
|
||||
{
|
||||
if (comp->root->children.empty()) return false;
|
||||
|
||||
frameNo += comp->startFrame;
|
||||
if (frameNo < comp->startFrame) frameNo = comp->startFrame;
|
||||
if (frameNo >= comp->endFrame) frameNo = (comp->endFrame - 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue