summaryrefslogtreecommitdiff
path: root/base/gxshade.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2017-06-29 11:20:09 +0100
committerChris Liddell <chris.liddell@artifex.com>2017-06-30 14:08:55 +0100
commit0b7fa9293f43dce8aea028e4d2b32da1d8fc18c8 (patch)
treec23031e84ab58a1826067da0ce4b46396b1bb231 /base/gxshade.c
parentd592ee18a9168b1190bc7f7a1426b41fa6d508af (diff)
downloadghostpdl-0b7fa9293f43dce8aea028e4d2b32da1d8fc18c8.tar.gz
Add error checking for gs_colorspace_set_icc_equivalent()
Diffstat (limited to 'base/gxshade.c')
-rw-r--r--base/gxshade.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/base/gxshade.c b/base/gxshade.c
index ded1bb857..4aa37de1c 100644
--- a/base/gxshade.c
+++ b/base/gxshade.c
@@ -320,6 +320,7 @@ shade_init_fill_state(shading_fill_state_t * pfs, const gs_shading_t * psh,
float max_error = min(pgs->smoothness, MAX_SMOOTHNESS);
bool is_lab;
bool cs_lin_test;
+ int code;
/*
* There's no point in trying to achieve smoothness beyond what
@@ -383,7 +384,9 @@ top:
/* If the CS is PS based and we have not yet converted to the ICC form
then go ahead and do that now */
if (gs_color_space_is_PSCIE(pcs) && pcs->icc_equivalent == NULL) {
- gs_colorspace_set_icc_equivalent((gs_color_space *)pcs, &(is_lab), pgs->memory);
+ code = gs_colorspace_set_icc_equivalent((gs_color_space *)pcs, &(is_lab), pgs->memory);
+ if (code < 0)
+ return code;
}
rendering_params.black_point_comp = pgs->blackptcomp;
rendering_params.graphics_type_tag = GS_PATH_TAG;