From 6f1fe667d814fcb9001a188dc6e749cd818701f6 Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Fri, 1 Apr 2022 12:40:10 +0900 Subject: [PATCH] [Tizen] Fix crash issue when animated image loading failed Change-Id: I052bbc7669d765b4fc21a6eb5ccaccead566875c Signed-off-by: Eunki, Hong --- dali-toolkit/internal/visuals/texture-manager-impl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dali-toolkit/internal/visuals/texture-manager-impl.cpp b/dali-toolkit/internal/visuals/texture-manager-impl.cpp index 9a50a00..bf28017 100644 --- a/dali-toolkit/internal/visuals/texture-manager-impl.cpp +++ b/dali-toolkit/internal/visuals/texture-manager-impl.cpp @@ -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(); } -- 2.7.4