context->updated_func is NULL during a nonincremental load.
* io-wbmp.c (gdk_pixbuf__wbmp_image_load_increment): context->updated_func is NULL during a nonincremental load. (gdk_pixbuf__wbmp_image_load): Stop reading after the first error.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2002-03-23 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
|
* io-wbmp.c (gdk_pixbuf__wbmp_image_load_increment):
|
||||||
|
context->updated_func is NULL during a nonincremental load.
|
||||||
|
(gdk_pixbuf__wbmp_image_load): Stop reading after the first error.
|
||||||
|
|
||||||
2002-03-18 Matthias Clasen <maclas@gmx.de>
|
2002-03-18 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* io-tga.c: Fix assumptions on rowstride by manually allocating a
|
* io-tga.c: Fix assumptions on rowstride by manually allocating a
|
||||||
|
|||||||
@ -93,11 +93,11 @@ static GdkPixbuf *gdk_pixbuf__wbmp_image_load(FILE * f, GError **error)
|
|||||||
|
|
||||||
while (feof(f) == 0) {
|
while (feof(f) == 0) {
|
||||||
length = fread(membuf, 1, 4096, f);
|
length = fread(membuf, 1, 4096, f);
|
||||||
if (length > 0)
|
if (!gdk_pixbuf__wbmp_image_load_increment(State, membuf, length,
|
||||||
gdk_pixbuf__wbmp_image_load_increment(State,
|
error)) {
|
||||||
membuf,
|
gdk_pixbuf__wbmp_image_stop_load (State, NULL);
|
||||||
length,
|
return NULL;
|
||||||
error);
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (State->pixbuf != NULL)
|
if (State->pixbuf != NULL)
|
||||||
@ -348,8 +348,9 @@ static gboolean gdk_pixbuf__wbmp_image_load_increment(gpointer data,
|
|||||||
context->needmore = FALSE;
|
context->needmore = FALSE;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
context->updated_func(context->pixbuf, 0, first_row, context->width, context->cury - first_row + 1,
|
if(context->updated_func)
|
||||||
context->user_data);
|
context->updated_func(context->pixbuf, 0, first_row, context->width, context->cury - first_row + 1,
|
||||||
|
context->user_data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bv = FALSE; /* Nothing left to do, stop feeding me data! */
|
bv = FALSE; /* Nothing left to do, stop feeding me data! */
|
||||||
|
|||||||
Reference in New Issue
Block a user