mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 20:14:37 +00:00
parent
a989dc9a7d
commit
b394a46cef
1 changed files with 6 additions and 2 deletions
|
@ -957,6 +957,8 @@ void LottieParser::parseImage(LottieImage* image, const char* data, const char*
|
|||
|
||||
LottieObject* LottieParser::parseAsset()
|
||||
{
|
||||
enterObject();
|
||||
|
||||
LottieObject* obj = nullptr;
|
||||
unsigned long id = 0;
|
||||
|
||||
|
@ -1018,7 +1020,6 @@ void LottieParser::parseAssets()
|
|||
{
|
||||
enterArray();
|
||||
while (nextArrayValue()) {
|
||||
enterObject();
|
||||
auto asset = parseAsset();
|
||||
if (asset) comp->assets.push(asset);
|
||||
else TVGERR("LOTTIE", "Invalid Asset!");
|
||||
|
@ -1477,7 +1478,10 @@ bool LottieParser::apply(LottieSlot* slot, bool byDefault)
|
|||
break;
|
||||
}
|
||||
case LottieProperty::Type::Image: {
|
||||
obj = parseAsset();
|
||||
while (auto key = nextObjectKey()) {
|
||||
if (KEY_AS("p")) obj = parseAsset();
|
||||
else skip(key);
|
||||
}
|
||||
context.parent = obj;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue