lottie/example: delete the animator only when its created.

Change-Id: Id6a4a7e704a8da298c0cae91a7065b80163f843d
This commit is contained in:
subhransu mohanty 2018-08-14 14:28:46 +09:00 committed by Hermet Park
parent e6b7dd8551
commit 1c4bd6c966
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ LottieView::~LottieView()
if (mRenderTask.valid())
mRenderTask.get();
ecore_animator_del(mAnimator);
if (mAnimator) ecore_animator_del(mAnimator);
if (mVg) evas_object_del(mVg);
if (mImage) evas_object_del(mImage);
delete mPlayer;

View File

@ -55,7 +55,7 @@ public:
int mRepeatCount;
LottieView::RepeatMode mRepeatMode;
LOTPlayer *mPlayer;
Ecore_Animator *mAnimator;
Ecore_Animator *mAnimator{nullptr};
bool mLoop;
int mCurCount;
bool mReverse;