aboutsummaryrefslogtreecommitdiff
path: root/src/jpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jpeg.c')
-rw-r--r--src/jpeg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jpeg.c b/src/jpeg.c
index 625808fb..5652aa56 100644
--- a/src/jpeg.c
+++ b/src/jpeg.c
@@ -304,6 +304,7 @@ static void Jpeg_write(DilloJpeg *jpeg, void *Buf, uint_t BufSize)
(uint_t)jpeg->cinfo.image_width,
(uint_t)jpeg->cinfo.image_height,
type, 1 / 2.2);
+ jpeg->Image = NULL; /* safeguard: may be freed by its owner later */
/* decompression step 4 (see libjpeg.doc) */
jpeg->state = DILLO_JPEG_STARTING;