summaryrefslogtreecommitdiff
path: root/source/fitz/load-jpx.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/load-jpx.c')
-rw-r--r--source/fitz/load-jpx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
index b7ddd505..f2751a58 100644
--- a/source/fitz/load-jpx.c
+++ b/source/fitz/load-jpx.c
@@ -435,7 +435,7 @@ fz_load_jpx_info(fz_context *ctx, const unsigned char *data, size_t size, int *w
jpx_read_image(ctx, &state, data, size, NULL, 1);
- *cspacep = state.cs;
+ *cspacep = fz_keep_colorspace(ctx, state.cs); /* state.cs is a borrowed device colorspace */
*wp = state.width;
*hp = state.height;
*xresp = state.xres;