summaryrefslogtreecommitdiff
path: root/source/fitz/context.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-07-08 02:45:39 +0800
committerSebastian Rasmussen <sebras@gmail.com>2017-07-10 18:35:53 +0800
commitae232f83790763b018bcbeb6d1a630f5bb45c270 (patch)
treee405db9014a8b422f5f0c11339ad0234c59224a5 /source/fitz/context.c
parent84aa0ee0901399bd5af61ecd73632634859c4267 (diff)
downloadmupdf-ae232f83790763b018bcbeb6d1a630f5bb45c270.tar.xz
Fix bug when cloning color management in context.
Creating a new color management instance requires the colorspace to be set, or else the cloning will not take place. This results in segfaults when converting a color later on. This was reproduced when running mudraw with multiple threads.
Diffstat (limited to 'source/fitz/context.c')
-rw-r--r--source/fitz/context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/context.c b/source/fitz/context.c
index 380af9a3..b342e6e1 100644
--- a/source/fitz/context.c
+++ b/source/fitz/context.c
@@ -293,9 +293,9 @@ fz_clone_context_internal(fz_context *ctx)
new_ctx->store = fz_keep_store_context(new_ctx);
new_ctx->glyph_cache = ctx->glyph_cache;
new_ctx->glyph_cache = fz_keep_glyph_cache(new_ctx);
- fz_new_cmm_context(new_ctx);
new_ctx->colorspace = ctx->colorspace;
new_ctx->colorspace = fz_keep_colorspace_context(new_ctx);
+ fz_new_cmm_context(new_ctx);
new_ctx->font = ctx->font;
new_ctx->font = fz_keep_font_context(new_ctx);
new_ctx->style = ctx->style;