summaryrefslogtreecommitdiff
path: root/source/fitz/separation.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-09-25 19:22:49 +0100
committerRobin Watts <robin.watts@artifex.com>2017-10-24 15:16:37 +0100
commit79bc9c182e74bcd58c6de33be8dfeb384a07199b (patch)
tree6e5155ac4558a785e6a483804b4e16675ae066a7 /source/fitz/separation.c
parentc8376f966de15dac704666cc7446366328ea8737 (diff)
downloadmupdf-79bc9c182e74bcd58c6de33be8dfeb384a07199b.tar.xz
Fix separations object handling when cloning for spots.
The 'producing spots' case is poorly tested, but I believe we should be keeping the spot information internally, rather than NULLing it out.
Diffstat (limited to 'source/fitz/separation.c')
-rw-r--r--source/fitz/separation.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/fitz/separation.c b/source/fitz/separation.c
index 5f8fee41..f4f5e262 100644
--- a/source/fitz/separation.c
+++ b/source/fitz/separation.c
@@ -195,6 +195,8 @@ fz_separations *fz_clone_separations_for_overprint(fz_context *ctx, fz_separatio
return NULL;
n = sep->num_separations;
+ if (n == 0)
+ return NULL;
c = 0;
for (i = 0; i < n; i++)
{
@@ -203,9 +205,10 @@ fz_separations *fz_clone_separations_for_overprint(fz_context *ctx, fz_separatio
c++;
}
- /* If no composites, then we are fine to render direct. */
+ /* If no composites, then we don't need to create a new seps object
+ * with the composite ones enabled, so just reuse our current object. */
if (c == 0)
- return NULL;
+ return fz_keep_separations(ctx, sep);
/* We need to clone us a separation structure, with all
* the composite separations marked as enabled. */