summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-01-25 20:50:25 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-01-25 20:50:25 +0000
commit1d871d5744a9bec3d8750b567d4c7b22203f1b2d (patch)
tree8cbe3e60b6ac077075b03d825edb72d919629188
parent633e4ef5a50928b06d504b7217fd9e6bc3de9fe3 (diff)
Temporary fix for JPEG error handle; we need to flag the error in
the callback function and test for it in the main code... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES1
-rw-r--r--src/Fl_JPEG_Image.cxx10
2 files changed, 5 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index a5279d3fe..ed2ecfbb7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.1.7
+ - Fixes to Fl_JPEG_Image error handler.
- Fl_Menu::popup() and ::pulldown() would crash an
application if a callback created widgets before they
returned (STR #685)
diff --git a/src/Fl_JPEG_Image.cxx b/src/Fl_JPEG_Image.cxx
index 403a20978..a2e8284a3 100644
--- a/src/Fl_JPEG_Image.cxx
+++ b/src/Fl_JPEG_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_JPEG_Image.cxx,v 1.1.2.11 2004/12/16 21:38:24 easysw Exp $"
+// "$Id: Fl_JPEG_Image.cxx,v 1.1.2.12 2005/01/25 20:50:25 easysw Exp $"
//
// Fl_JPEG_Image routines.
//
@@ -91,8 +91,6 @@ Fl_JPEG_Image::Fl_JPEG_Image(const char *jpeg) // I - File to load
jpeg_stdio_src(&cinfo, fp);
jpeg_read_header(&cinfo, 1);
- if (cinfo.err->msg_code) goto error_return;
-
cinfo.quantize_colors = (boolean)FALSE;
cinfo.out_color_space = JCS_RGB;
cinfo.out_color_components = 3;
@@ -111,8 +109,6 @@ Fl_JPEG_Image::Fl_JPEG_Image(const char *jpeg) // I - File to load
while (cinfo.output_scanline < cinfo.output_height)
{
- if (cinfo.err->msg_code) goto error_return;
-
row = (JSAMPROW)(array +
cinfo.output_scanline * cinfo.output_width *
cinfo.output_components);
@@ -124,6 +120,7 @@ Fl_JPEG_Image::Fl_JPEG_Image(const char *jpeg) // I - File to load
fclose(fp);
+# if 0
// JPEG error handling...
error_return:
@@ -141,9 +138,10 @@ Fl_JPEG_Image::Fl_JPEG_Image(const char *jpeg) // I - File to load
array = 0;
alloc_array = 0;
}
+# endif // 0
#endif // HAVE_LIBJPEG
}
//
-// End of "$Id: Fl_JPEG_Image.cxx,v 1.1.2.11 2004/12/16 21:38:24 easysw Exp $".
+// End of "$Id: Fl_JPEG_Image.cxx,v 1.1.2.12 2005/01/25 20:50:25 easysw Exp $".
//