diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-10-24 16:00:54 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-10-25 10:58:36 +0100 |
commit | 531f7ea84daa607e370757d82d8bf7e300fc76b5 (patch) | |
tree | b621cbb5797639a343e3b46d35ec842aa4450535 /source/fitz/load-jxr.c | |
parent | 75be08bcb490e9b68ef598372ff659ad960f6335 (diff) | |
download | mupdf-531f7ea84daa607e370757d82d8bf7e300fc76b5.tar.xz |
Fix colorspace reference counting in fz_load_*_info.
These are called from fz_new_image_from_buffer.
Diffstat (limited to 'source/fitz/load-jxr.c')
-rw-r--r-- | source/fitz/load-jxr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/fitz/load-jxr.c b/source/fitz/load-jxr.c index a83d7f6a..29877575 100644 --- a/source/fitz/load-jxr.c +++ b/source/fitz/load-jxr.c @@ -431,12 +431,11 @@ fz_load_jxr_info(fz_context *ctx, const unsigned char *data, size_t size, int *w struct info info = { 0 }; jxr_read_image(ctx, data, size, &info, 1); - - *xresp = info.xres; - *yresp = info.yres; + *cspacep = fz_keep_colorspace(ctx, info.cspace); /* info.cspace is a borrowed device colorspace */ *wp = info.width; *hp = info.height; - *cspacep = info.cspace; + *xresp = info.xres; + *yresp = info.yres; } #else /* HAVE_JPEGXR */ |