summaryrefslogtreecommitdiff
path: root/source/fitz/separation.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-11-23 11:01:22 +0000
committerRobin Watts <robin.watts@artifex.com>2017-12-06 17:52:16 +0000
commit2be51ed491ede636c71ee0e0ae0ee2576d9e9561 (patch)
tree7571a2f48227ad68aeee13d46ac2c92828f1909c /source/fitz/separation.c
parenteb9afa2f46192b86352caded1ae56e79ed64dd4a (diff)
downloadmupdf-2be51ed491ede636c71ee0e0ae0ee2576d9e9561.tar.xz
Update fz_convert_separation_colors to cope with unnamed separations.
Well, at least not to crash.
Diffstat (limited to 'source/fitz/separation.c')
-rw-r--r--source/fitz/separation.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/fitz/separation.c b/source/fitz/separation.c
index ee3c35c7..fe1530a7 100644
--- a/source/fitz/separation.c
+++ b/source/fitz/separation.c
@@ -985,6 +985,8 @@ void fz_convert_separation_colors(fz_context *ctx, const fz_color_params *color_
{
const char *name = fz_colorspace_colorant(ctx, src_cs, i);
+ if (name == NULL)
+ continue;
if (i == 0 && !strcmp(name, "All"))
{
/* This is only supposed to happen in separation spaces, not DeviceN */
@@ -1002,19 +1004,19 @@ void fz_convert_separation_colors(fz_context *ctx, const fz_color_params *color_
for (j = pred; j < ds; j++)
{
const char *dname = dst_seps->name[j];
- if (!strcmp(name, dname))
+ if (dname && !strcmp(name, dname))
goto found_sep;
}
for (j = 0; j < pred; j++)
{
const char *dname = dst_seps->name[j];
- if (!strcmp(name, dname))
+ if (dname && !strcmp(name, dname))
goto found_sep;
}
for (j = 0; j < dc; j++)
{
const char *dname = fz_colorspace_colorant(ctx, dst_cs, j);
- if (!strcmp(name, dname))
+ if (dname && !strcmp(name, dname))
goto found_process;
}
if (0) {