mirror of https://github.com/fltk/fltk
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
This commit is contained in:
parent
633e4ef5a5
commit
1d871d5744
1
CHANGES
1
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)
|
||||
|
|
|
@ -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 $".
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue