svg_loader SvgLoader: Fix copy conditions for stop of gradient
authorJunsuChoi <jsuya.choi@samsung.com>
Thu, 4 Mar 2021 02:26:52 +0000 (11:26 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 5 Mar 2021 04:36:06 +0000 (13:36 +0900)
When getting a linked stop list, if there is no existing stop list
in current gradient, it is copied.

src/loaders/svg/tvgSvgLoader.cpp

index f6c9c6e..1afb338 100644 (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