[Tizen] Fix assert when callback cancel timer during execute callback 71/312771/1
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:35:14 +0000 (14:35 +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 89a44c381701b8b71d21eb7d96938ea96a4ced96..9a52d575ab32b93d34e1cd6f855ad1b6672c3b2b 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