diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-07-16 19:11:13 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-07-16 19:11:13 +0000 |
commit | e8ea8cb534e71c7dbc886b222b8ce8c14a6cfe55 (patch) | |
tree | a8a5837009c905fd2d6505bc38a6e5a9d38561e4 | |
parent | fb56ad6a2b294a12fdc95f3a38085864e0b1c44a (diff) | |
download | gdk-pixbuf-e8ea8cb534e71c7dbc886b222b8ce8c14a6cfe55.tar.gz |
Merge from trunk:
2007-07-16 Matthias Clasen <mclasen@redhat.com>
Merge from trunk:
* io-tiff.c: Revert the last change, it was wrong
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Redo the last
change in a different way.
svn path=/branches/gtk-2-10/; revision=18480
-rw-r--r-- | gdk-pixbuf/ChangeLog | 8 | ||||
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-loader.c | 8 | ||||
-rw-r--r-- | gdk-pixbuf/io-tiff.c | 12 |
3 files changed, 20 insertions, 8 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 4394bc9f4..b5e87469f 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,11 @@ +2007-07-16 Matthias Clasen <mclasen@redhat.com> + + Merge from trunk: + + * io-tiff.c: Revert the last change, it was wrong + * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Redo the last + change in a different way. + 2007-07-03 Matthias Clasen <mclasen@redhat.com> Merge from trunk: diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c index 7b2e56d05..c9ad78957 100644 --- a/gdk-pixbuf/gdk-pixbuf-loader.c +++ b/gdk-pixbuf/gdk-pixbuf-loader.c @@ -714,8 +714,12 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader, GError *tmp = NULL; if (!priv->image_module->stop_load (priv->context, &tmp) || tmp) { - gdk_pixbuf_loader_ensure_error (loader, &tmp); - g_propagate_error (error, tmp); + /* don't call gdk_pixbuf_loader_ensure_error() + * here, since we might not get an error in the + * gdk_pixbuf_get_file_info() case + */ + if (tmp) + g_propagate_error (error, tmp); retval = FALSE; } } diff --git a/gdk-pixbuf/io-tiff.c b/gdk-pixbuf/io-tiff.c index c63bfdd7d..49ee7d110 100644 --- a/gdk-pixbuf/io-tiff.c +++ b/gdk-pixbuf/io-tiff.c @@ -211,12 +211,12 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error) gint w = width; gint h = height; (* context->size_func) (&w, &h, context->user_data); - - if (w == 0 || h == 0) { - g_set_error (error, - GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_CORRUPT_IMAGE, - _("Width or height of TIFF image is zero")); + /* This is a signal that this function is being called + to support gdk_pixbuf_get_file_info, so we can stop + parsing the tiff file at this point. It is not an + error condition. */ + + if (w == 0 || h == 0) return NULL; } } |