summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-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. */