tvgSvgLoader: Fix wrong bracket

This commit is contained in:
JunsuChoi 2020-10-13 10:00:03 +09:00 committed by Hermet Park
parent e73cf7db60
commit 098c94819c
2 changed files with 3 additions and 4 deletions

View file

@ -1445,7 +1445,7 @@ static SvgNode* _findChildById(SvgNode* node, const char* id)
static SvgNode* _findNodeById(SvgNode *node, string* id)
{
SvgNode* result = nullptr;
if ((node->id != nullptr) && !node->id->compare(*id)) return node;
if (node->id && !node->id->compare(*id)) return node;
if (node->child.cnt > 0) {
auto child = node->child.list;

View file

@ -359,7 +359,7 @@ unique_ptr<Scene> _sceneBuildHelper(SvgNode* node, float vx, float vy, float vw,
(*child)->style->opacity = ((*child)->style->opacity * node->style->opacity) / 255.0f;
scene->push(_shapeBuildHelper(*child, vx, vy, vw, vh));
}
}
//Apply composite node
if (node->style->comp.node) {
//Composite ClipPath
@ -374,7 +374,6 @@ unique_ptr<Scene> _sceneBuildHelper(SvgNode* node, float vx, float vy, float vw,
}
}
}
}
return scene;
}
return nullptr;