summaryrefslogtreecommitdiff
path: root/image/gif.c
diff options
context:
space:
mode:
Diffstat (limited to 'image/gif.c')
-rw-r--r--image/gif.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/image/gif.c b/image/gif.c
index cb0970b42..b214d3a0d 100644
--- a/image/gif.c
+++ b/image/gif.c
@@ -196,6 +196,7 @@ void nsgif_destroy(struct content *c)
*/
gif_result nsgif_get_frame(struct content *c) {
int previous_frame, current_frame, frame;
+ gif_result res = GIF_OK;
current_frame = c->data.gif.current_frame;
if (!option_animate_images)
@@ -205,7 +206,9 @@ gif_result nsgif_get_frame(struct content *c) {
else
previous_frame = c->data.gif.gif->decoded_frame + 1;
for (frame = previous_frame; frame <= current_frame; frame++)
- return gif_decode_frame(c->data.gif.gif, frame);
+ res = gif_decode_frame(c->data.gif.gif, frame);
+
+ return res;
}