summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-09-27 00:08:59 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-09-27 00:08:59 -0500
commit37bcaebd22d0ab6be333d5d23d3d52a2697b63e7 (patch)
tree1e28d5d80227205191803fcde32c57dcede33f79
parentba5376f3685e305ad63fae28ad46000d7647ec30 (diff)
downloadqt3-37bcaebd22d0ab6be333d5d23d3d52a2697b63e7.tar.gz
qt3-37bcaebd22d0ab6be333d5d23d3d52a2697b63e7.zip
Fix Qt3 libjpeg silent crash if compiled library version does not match the shared library version present on the local system
Thanks to "Fat-Zer" for the patch!
-rw-r--r--src/kernel/qjpegio.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/qjpegio.cpp b/src/kernel/qjpegio.cpp
index 2c7556e..5d2a1b1 100644
--- a/src/kernel/qjpegio.cpp
+++ b/src/kernel/qjpegio.cpp
@@ -203,13 +203,13 @@ void read_jpeg_image(QImageIO* iio)
struct my_jpeg_source_mgr *iod_src = new my_jpeg_source_mgr(iio);
struct my_error_mgr jerr;
+ cinfo.err = jpeg_std_error(&jerr);
+ jerr.error_exit = my_error_exit;
+
jpeg_create_decompress(&cinfo);
cinfo.src = iod_src;
- cinfo.err = jpeg_std_error(&jerr);
- jerr.error_exit = my_error_exit;
-
if (!setjmp(jerr.setjmp_buffer)) {
#if defined(Q_OS_UNIXWARE)
(void) jpeg_read_header(&cinfo, B_TRUE);