mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Always set an error when returning NULL. (453365, Michael Chudobiak)
2007-07-03 Matthias Clasen <mclasen@redhat.com> * io-tiff.c (tiff_image_parse): Always set an error when returning NULL. (453365, Michael Chudobiak) svn path=/trunk/; revision=18365
This commit is contained in:
parent
22fa07d55d
commit
cf12fd0de5
@ -1,3 +1,8 @@
|
||||
2007-07-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-tiff.c (tiff_image_parse): Always set an error
|
||||
when returning NULL. (453365, Michael Chudobiak)
|
||||
|
||||
2007-07-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Be
|
||||
|
@ -199,8 +199,13 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
|
||||
gint h = height;
|
||||
(* context->size_func) (&w, &h, context->user_data);
|
||||
|
||||
if (w == 0 || h == 0)
|
||||
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"));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
pixels = g_try_malloc (bytes);
|
||||
|
Loading…
Reference in New Issue
Block a user