1 diff --git a/io-webp.c b/io-webp.c
2 index c67e0a9..de2f83a 100644
5 @@ -143,6 +143,8 @@ stop_load (gpointer data, GError **error)
7 if (context->prepare_func)
8 context->prepare_func (pb, GDK_PIXBUF_ANIMATION (anim), context->user_data);
9 + if (context->update_func)
10 + context->update_func (pb, 0, 0, context->width, context->height, context->user_data);
14 @@ -174,6 +176,9 @@ stop_load (gpointer data, GError **error)
18 + if (context->prepare_func)
19 + context->prepare_func (pb, NULL, context->user_data);
23 gdk_pixbuf_set_option (pb, "icc-profile", icc_data);
24 @@ -187,10 +192,8 @@ stop_load (gpointer data, GError **error)
25 context->buffer->len, &config);
26 if (status == VP8_STATUS_OK)
28 - if (context->prepare_func)
29 - context->prepare_func (pb, NULL, context->user_data);
31 - g_clear_object (&pb);
32 + if (context->update_func)
33 + context->update_func (pb, 0, 0, context->width, context->height, context->user_data);
37 @@ -198,6 +201,8 @@ stop_load (gpointer data, GError **error)
38 g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED,
39 "WebP decoder failed with VP8 status code: %d", status);
42 + g_clear_object (&pb);