mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
lottie: ++stability
ensure that the loading has been completed before overriding.
This commit is contained in:
parent
3de7580d96
commit
0268e9e3d1
1 changed files with 4 additions and 1 deletions
|
@ -262,7 +262,8 @@ bool LottieLoader::read()
|
|||
|
||||
Paint* LottieLoader::paint()
|
||||
{
|
||||
this->done();
|
||||
done();
|
||||
|
||||
if (!comp) return nullptr;
|
||||
comp->initiated = true;
|
||||
return comp->root->scene;
|
||||
|
@ -271,6 +272,8 @@ Paint* LottieLoader::paint()
|
|||
|
||||
bool LottieLoader::override(const char* slot)
|
||||
{
|
||||
if (!comp) done();
|
||||
|
||||
if (!comp || comp->slots.count == 0) return false;
|
||||
|
||||
auto success = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue