lottie: Fix crash issue from last patch. 64/193064/1
authorsubhransu mohanty <sub.mohanty@samsung.com>
Wed, 14 Nov 2018 07:52:40 +0000 (16:52 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Wed, 14 Nov 2018 07:55:12 +0000 (16:55 +0900)
Change-Id: Ia8178e3454e26ae2ced8fb0bef66b1c5026f1d26

src/lottie/lottieitem.h

index 7cdf5fe27a9fcfadce54993dfde0af86d452298b..9a5f1dc5e6570633d0487cea3be1ec0edc1fb319 100644 (file)
@@ -162,8 +162,8 @@ public:
     std::unique_ptr<LOTNode>  mCNode;
 
     ~LOTDrawable() {
-        if (mCNode.get()->mGradient.stopCount > 0)
-          free(mCNode.get()->mGradient.stopPtr);
+        if (mCNode && mCNode->mGradient.stopPtr)
+          free(mCNode->mGradient.stopPtr);
     }
 };