image: fix a crash, 0 divide problem.

if the gif is invalid animated image,
the frame count could be 0.

@fix
This commit is contained in:
ChunEon Park 2015-07-09 11:08:34 +09:00
parent 3a03092180
commit f8662bc2a0
1 changed files with 1 additions and 1 deletions

View File

@ -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);