[Tizen] Fix crash issue when animated image loading failed 41/273241/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Fri, 1 Apr 2022 03:40:10 +0000 (12:40 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 1 Apr 2022 03:41:34 +0000 (12:41 +0900)
Change-Id: I052bbc7669d765b4fc21a6eb5ccaccead566875c
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/visuals/texture-manager-impl.cpp

index 9a50a00..bf28017 100644 (file)
@@ -1410,8 +1410,12 @@ void TextureManager::NotifyObservers(TextureInfo& textureInfo, bool success)
 
   if(info->animatedImageLoading)
   {
-    info->frameCount    = info->animatedImageLoading.GetImageCount();
-    info->frameInterval = info->animatedImageLoading.GetFrameInterval(info->frameIndex);
+    // If loading failed, we don't need to get frameCount and frameInterval.
+    if(success)
+    {
+      info->frameCount    = info->animatedImageLoading.GetImageCount();
+      info->frameInterval = info->animatedImageLoading.GetFrameInterval(info->frameIndex);
+    }
     info->animatedImageLoading.Reset();
   }