diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-08-15 13:50:27 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-08-15 13:50:27 +0000 |
commit | e6a81811f97829b605b0a86a488e2d25006b2e95 (patch) | |
tree | 11cf5f1b8b1bd14fa5f0ccc947f510f0af32df58 /gdk-pixbuf/io-jpeg.c | |
parent | 4b5f259ba03131f21cc820331731d166fd0d3f56 (diff) | |
download | gtk+-e6a81811f97829b605b0a86a488e2d25006b2e95.tar.gz |
Pay attention to the libjpeg error code and report OOM errors as such.
2005-08-15 Matthias Clasen <mclasen@redhat.com>
* io-jpeg.c (fatal_error_handler): Pay attention to the
libjpeg error code and report OOM errors as such. (#312674,
Tommi Komulainen)
Diffstat (limited to 'gdk-pixbuf/io-jpeg.c')
-rw-r--r-- | gdk-pixbuf/io-jpeg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c index 7f21594760..fe49c256f0 100644 --- a/gdk-pixbuf/io-jpeg.c +++ b/gdk-pixbuf/io-jpeg.c @@ -33,6 +33,7 @@ #include <string.h> #include <setjmp.h> #include <jpeglib.h> +#include <jerror.h> #include "gdk-pixbuf-private.h" #include "gdk-pixbuf-io.h" @@ -110,7 +111,9 @@ fatal_error_handler (j_common_ptr cinfo) if (errmgr->error && *errmgr->error == NULL) { g_set_error (errmgr->error, GDK_PIXBUF_ERROR, - GDK_PIXBUF_ERROR_CORRUPT_IMAGE, + cinfo->err->msg_code == JERR_OUT_OF_MEMORY + ? GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY + : GDK_PIXBUF_ERROR_CORRUPT_IMAGE, _("Error interpreting JPEG image file (%s)"), buffer); } |