hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=34c83f7f138f44bfc42fa578a8c5066f93578830

commit 34c83f7f138f44bfc42fa578a8c5066f93578830
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Thu Jul 9 11:08:34 2015 +0900

    image: fix a crash, 0 divide problem.
    
    if the gif is invalid animated image,
    the frame count could be 0.
    
    @fix
---
 src/lib/elm_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index 6a71943..17e54cc 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -83,7 +83,7 @@ _elm_image_animate_cb(void *data)
    if (!sd->anim) return ECORE_CALLBACK_CANCEL;
 
    sd->cur_frame++;
-   if (sd->cur_frame > sd->frame_count)
+   if ((sd->frame_count > 0) && (sd->cur_frame > sd->frame_count))
      sd->cur_frame = sd->cur_frame % sd->frame_count;
 
    evas_object_image_animated_frame_set(sd->img, sd->cur_frame);

-- 


Reply via email to