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 382bf2cec1d62f2d2921aa7457ead224a2cb7968..f3ca3247c2d930587b1bb0db6f49c6b553aae54f 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;