summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/gdk-pixbuf-loader.c
diff options
context:
space:
mode:
authorMark Crichton <crichton@src.gnome.org>2000-01-06 20:19:30 +0000
committerMark Crichton <crichton@src.gnome.org>2000-01-06 20:19:30 +0000
commit519ee0665d4bd6aa374f4eaa5a311f461c1f7dc5 (patch)
tree13c506616c364c8dec52d357e6cfbe5922131b0e /gdk-pixbuf/gdk-pixbuf-loader.c
parenta0a158410663c471ad7f0d0a6c7d81116e76d33a (diff)
downloadgtk+-519ee0665d4bd6aa374f4eaa5a311f461c1f7dc5.tar.gz
Fixed bug sent directly to me. Basically, we weren't checking a failure
Fixed bug sent directly to me. Basically, we weren't checking a failure case from load_module, and returning junk to the application. Bad. See ChangeLog for more info.
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-loader.c')
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index cd1b91418b..69bb7f98ea 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -300,9 +300,10 @@ gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf,
priv->header_buf_offset += nbytes;
- if(priv->header_buf_offset >= LOADER_HEADER_SIZE)
- gdk_pixbuf_loader_load_module(loader);
-
+ if(priv->header_buf_offset >= LOADER_HEADER_SIZE) {
+ if (gdk_pixbuf_loader_load_module(loader) == 0)
+ return 0;
+ }
return nbytes;
}