diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2011-05-17 15:42:11 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2011-05-17 15:42:11 +0100 |
commit | 1b7bf4222988019f17a454ce7a6b841d586c3d4d (patch) | |
tree | 15dfee30c17f8ad0ff2ca9ec622590f5a866c790 | |
parent | 6283d613595f2c42a461d2cb8cfddb2e0a6fc168 (diff) | |
download | ghostpdl-1b7bf4222988019f17a454ce7a6b841d586c3d4d.tar.gz |
Comment and error code handling tweaks to gdevp14.c
Correct a typo, update a comment, and avoid a SEGV in the case where
an allocation of an iccsmask fails.
No cluster differences expected.
-rw-r--r-- | gs/base/gdevp14.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gs/base/gdevp14.c b/gs/base/gdevp14.c index e6862c0a5..9148c4a54 100644 --- a/gs/base/gdevp14.c +++ b/gs/base/gdevp14.c @@ -1560,7 +1560,7 @@ pdf14_put_image(gx_device * dev, gs_imager_state * pis, gx_device * target) code = dev_proc(dev, get_profile)(dev, gs_current_object_tag(pis->memory), &(pcs->cmm_icc_profile_data), &rendering_intent); - /* Increment to match the release of the pcs below */ + /* pcs takes a reference to the profile data it just retrieved. */ rc_increment(pcs->cmm_icc_profile_data); gs_image_t_init_adjust(&image, pcs, false); image.ImageMatrix.xx = (float)width; @@ -7375,12 +7375,13 @@ pdf14_increment_smask_color(gs_imager_state * pis, gx_device * dev) pdev->smaskcolor->ref_count++; } else { /* Allocate and swap out the current profiles. The softmask - profiles should already b in place */ + profiles should already be in place */ result = gs_alloc_struct(pdev->memory, pdf14_smaskcolor_t, &st_pdf14_smaskcolor, "pdf14_increment_smask_color"); if (result == NULL ) return(-1); result->profiles = gsicc_new_iccsmask(pdev->memory); + if (result->profiles == NULL ) return(-1); pdev->smaskcolor = result; /* Theoretically there should not be any reason to change ref counts on the profiles for a well-formed PDF with clean soft mask groups. |