lottie/player: call setPos() only if size is already set. 35/186635/1
authorsubhransu mohanty <sub.mohanty@samsung.com>
Mon, 13 Aug 2018 04:43:19 +0000 (13:43 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Mon, 13 Aug 2018 04:46:04 +0000 (13:46 +0900)
Change-Id: If08c49c398d6d8d90ab845020108b368ea204505

src/lottie/lottieplayer.cpp

index 382bf2c..f3ca324 100644 (file)
@@ -119,9 +119,10 @@ bool LOTPlayerPrivate::setFilePath(std::string path)
     if (loader.load(path)) {
         mModel = loader.model();
         mCompItem = std::make_unique<LOTCompItem>(mModel.get());
-        if (!mSize.isEmpty())
+        if (!mSize.isEmpty()) {
             setSize(mSize);
-        setPos(0);
+            setPos(0);
+        }
         return true;
     }
     return false;