[Tizen](Vector) Check if the object is valid accepted/tizen/5.5/unified/20191228.075107 submit/tizen_5.5/20191219.061022 submit/tizen_5.5/20191223.020122 submit/tizen_5.5/20191223.102805
authorWonsik Jung <sidein@samsung.com>
Thu, 19 Dec 2019 04:23:28 +0000 (13:23 +0900)
committerWonsik Jung <sidein@samsung.com>
Thu, 19 Dec 2019 04:23:37 +0000 (13:23 +0900)
Change-Id: I1d79bee32a19c8bf650c4cbceb12e0ebcbf3100a

dali-extension/vector-animation-renderer/tizen-vector-animation-manager.cpp
dali-extension/vector-animation-renderer/tizen-vector-animation-renderer.cpp

index 557bdfd..d92e569 100755 (executable)
@@ -118,7 +118,12 @@ void TizenVectorAnimationManager::OnEventTriggered()
 
   for( auto&& iter : handlers )
   {
-    iter->NotifyEvent();
+    // Check if it is valid
+    auto handler = std::find( mEventHandlers.begin(), mEventHandlers.end(), iter );
+    if( handler != mEventHandlers.end() )
+    {
+      iter->NotifyEvent();
+    }
   }
 }
 
index ae5dfb4..9cbdaf0 100755 (executable)
@@ -120,6 +120,8 @@ void TizenVectorAnimationRenderer::Finalize()
 
   mTargetSurface = nullptr;
   mTbmQueue = NULL;
+
+  DALI_LOG_RELEASE_INFO( "TizenVectorAnimationRenderer::Finalize: [%p]\n", this );
 }
 
 void TizenVectorAnimationRenderer::SetRenderer( Renderer renderer )