summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
Diffstat (limited to 'image')
-rw-r--r--image/gif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/image/gif.c b/image/gif.c
index 820b7181a..098287573 100644
--- a/image/gif.c
+++ b/image/gif.c
@@ -408,6 +408,11 @@ static void *nsgif_get_internal(const struct content *c, void *context)
{
nsgif_content *gif = (nsgif_content *) c;
+ if (gif->current_frame != gif->gif->decoded_frame) {
+ if (nsgif_get_frame(gif) != GIF_OK)
+ return NULL;
+ }
+
return gif->gif->frame_image;
}