mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-28 09:05:52 +00:00
lottie: ++stability
ensure that the loading has been completed before overriding.
This commit is contained in:
parent
2a8b80f058
commit
0c12e662e4
1 changed files with 4 additions and 1 deletions
|
@ -258,7 +258,8 @@ bool LottieLoader::read()
|
|||
|
||||
Paint* LottieLoader::paint()
|
||||
{
|
||||
this->done();
|
||||
done();
|
||||
|
||||
if (!comp) return nullptr;
|
||||
comp->initiated = true;
|
||||
return comp->root->scene;
|
||||
|
@ -267,6 +268,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