Re: gdk_pixbuf_loader_write and short files



Turns out I forgot one place to properly deal
with short files at close time. gdk_pixbuf_loader_close
must not forget to propagate errors originating from 
processing leftover data.

Ok to commit the following patch ?

Index: gdk-pixbuf-loader.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk-pixbuf/gdk-pixbuf-loader.c,v
retrieving revision 1.58
diff -u -3 -p -u -r1.58 gdk-pixbuf-loader.c
--- gdk-pixbuf-loader.c	2001/06/29 16:30:21	1.58
+++ gdk-pixbuf-loader.c	2001/08/28 19:27:50
@@ -529,9 +529,9 @@ gdk_pixbuf_loader_close (GdkPixbufLoader
   
   /* We have less the 128 bytes in the image.  Flush it, and keep going. */
   if (priv->image_module == NULL)
-    gdk_pixbuf_loader_load_module (loader, NULL, NULL);
+    retval = gdk_pixbuf_loader_load_module (loader, NULL, error);
   
-  if (priv->image_module && priv->image_module->stop_load && priv->context)
+  if (retval && priv->image_module && priv->image_module->stop_load && 
priv->context)
     retval = priv->image_module->stop_load (priv->context, error);
   
   priv->closed = TRUE;




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]