summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2017-12-05 06:21:08 +0100
committerBastien Nocera <hadess@hadess.net>2017-12-05 06:42:10 +0100
commitfa472afe93ecf4a1863d4fcbe79cccad5a613faf (patch)
treee19825737727c70ad501bffad7fa7e2339657394 /gdk-pixbuf
parent73855e7e033143343d1c07e413951f7ba062b9df (diff)
downloadgdk-pixbuf-fa472afe93ecf4a1863d4fcbe79cccad5a613faf.tar.gz
jpeg: Use a temporary variable
To avoid using context->cinfo all the time. https://bugzilla.gnome.org/show_bug.cgi?id=753605
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/io-jpeg.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index 23284a74e..1e7fcd039 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -842,9 +842,12 @@ static gboolean
gdk_pixbuf__jpeg_image_stop_load (gpointer data, GError **error)
{
JpegProgContext *context = (JpegProgContext *) data;
+ struct jpeg_decompress_struct *cinfo;
gboolean retval;
g_return_val_if_fail (context != NULL, TRUE);
+
+ cinfo = &context->cinfo;
/* FIXME this thing needs to report errors if
* we have unused image data
@@ -857,16 +860,16 @@ gdk_pixbuf__jpeg_image_stop_load (gpointer data, GError **error)
context->jerr.error = error;
if (sigsetjmp (context->jerr.setjmp_buffer, 1)) {
retval = FALSE;
+ g_message ("do we have an error?");
} else {
- jpeg_finish_decompress (&context->cinfo);
+ jpeg_finish_decompress (cinfo);
retval = TRUE;
}
jpeg_destroy_decompress (&context->cinfo);
- if (context->cinfo.src) {
- my_src_ptr src = (my_src_ptr) context->cinfo.src;
-
+ if (cinfo->src) {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
g_free (src);
}