[Tizen] Fix assert when callback cancel timer during execute callback 72/312772/1 accepted/tizen/8.0/unified/20240704.174818
authorEunki, Hong <eunkiki.hong@samsung.com>
Fri, 14 Jun 2024 05:02:48 +0000 (14:02 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 14 Jun 2024 05:36:23 +0000 (14:36 +0900)
It is possible that user can call CancelTimer during timer callback execute.

If then, timerIter could be end. If this case, we should not move iterator
into spent container.

Change-Id: Ie28b9dfdddcc2a7ef300c783a9b50d5620761674
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/legacy/common/tizen-platform-abstraction.cpp

index e783f8f4bb6b46ab6de80e7db5a4194e0afcb5aa..5e5ac78a0babfe4e24c6ae77e5e102f954122190 100644 (file)
@@ -226,7 +226,9 @@ void TizenPlatformAbstraction::RunTimerFunction(TimerCallback& timerPtr)
 
   if(timerIter == std::end(mTimerPairsWaiting))
   {
-    DALI_ASSERT_DEBUG(false);
+    // It might be cancel during callback execute.
+    // Just return now.
+    return;
   }
 
   // ...and move it