From 5021904329309bb8b1c8c4ada7ffc61eb934625e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 30 Aug 2001 07:23:32 +0000 Subject: [PATCH] gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Propagate errors from gdk_pixbuf_loader_load_module. --- gdk-pixbuf/ChangeLog | 5 +++++ gdk-pixbuf/gdk-pixbuf-loader.c | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 0b0a71e0c4..5c1fc08b3b 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +Thu Aug 30 08:30:03 2001 Matthias Clasen + + * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Propagate + errors from gdk_pixbuf_loader_load_module. + Thu Aug 30 08:27:37 2001 Matthias Clasen * io-png.c (png_row_callback): Check that row_num is valid. diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c index 77c8ea8890..0149357b24 100644 --- a/gdk-pixbuf/gdk-pixbuf-loader.c +++ b/gdk-pixbuf/gdk-pixbuf-loader.c @@ -529,9 +529,16 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader, /* 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); - - if (priv->image_module && priv->image_module->stop_load && priv->context) + { + GError *tmp = NULL; + gdk_pixbuf_loader_load_module (loader, NULL, &tmp); + if (tmp != NULL) + { + g_propagate_error (error, tmp); + retval = FALSE; + } + } + if (retval && priv->image_module && priv->image_module->stop_load && priv->context) retval = priv->image_module->stop_load (priv->context, error); priv->closed = TRUE; @@ -540,3 +547,5 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader, return retval; } + +