svg_loader SvgLoader: Fix copy conditions for stop of gradient

When getting a linked stop list, if there is no existing stop list
in current gradient, it is copied.
This commit is contained in:
JunsuChoi 2021-03-04 11:26:52 +09:00 committed by Hermet Park
parent a173b16ed5
commit f590571e3a

View file

@ -2375,7 +2375,7 @@ static SvgStyleGradient* _gradientDup(Array<SvgStyleGradient*>* gradients, const
gradList = gradients->data;
for (uint32_t i = 0; i < gradients->count; ++i) {
if (!((*gradList)->id->compare(*result->ref))) {
if (result->stops.count > 0) {
if (result->stops.count == 0) {
_cloneGradStops(&result->stops, &(*gradList)->stops);
}
//TODO: Properly inherit other property