Fix error reporting in the gif loader

svn path=/trunk/; revision=17197
This commit is contained in:
Matthias Clasen 2007-01-21 17:27:23 +00:00
parent b446db4992
commit a236fb7a26
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-01-21 Matthias Clasen <mclasen@redhat.com>
* io-gif.c (gdk_pixbuf__gif_image_stop_load): Return an
error if we didn't successfully load a frame. (#394190,
Felix Riemann)
2007-01-17 Michael Natterer <mitch@imendio.com> 2007-01-17 Michael Natterer <mitch@imendio.com>
Patch taken from maemo-gtk: Patch taken from maemo-gtk:

View File

@ -1526,7 +1526,7 @@ gdk_pixbuf__gif_image_stop_load (gpointer data, GError **error)
GifContext *context = (GifContext *) data; GifContext *context = (GifContext *) data;
gboolean retval = TRUE; gboolean retval = TRUE;
if (context->state != GIF_DONE) { if (context->state != GIF_DONE || context->animation->frames == NULL) {
g_set_error (error, g_set_error (error,
GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE, GDK_PIXBUF_ERROR_CORRUPT_IMAGE,