Commit b072e758 authored by Mukund Sivaraman's avatar Mukund Sivaraman

file-jpeg: Make cinfo struct static so asynchronous saves don't crash

The plug-in already makes a copy of the cinfo struct for asynchronous
save, but it seems that somewhere inside cinfo, a pointer points to
another region in this struct. So, everything is copied as-is, and
the pointer ends up pointing to somewhere in the save_image() stack
which is gone when that function returns.
parent 150983ac
......@@ -265,8 +265,8 @@ save_image (const gchar *filename,
GimpDrawable *drawable;
GimpImageType drawable_type;
GimpParasite *parasite;
struct jpeg_compress_struct cinfo;
struct my_error_mgr jerr;
static struct jpeg_compress_struct cinfo;
static struct my_error_mgr jerr;
JpegSubsampling subsampling;
FILE * volatile outfile;
guchar *temp, *t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment