summaryrefslogtreecommitdiff
path: root/base/gdevprn.c
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2021-10-10 00:00:15 -0700
committerMichael Vrhel <michael.vrhel@artifex.com>2021-10-15 08:56:58 -0700
commitc712ee3f9c34daf98bbb8a97cc0ab8577f45810a (patch)
tree198a48d7832ce5491df34947f8efa96502639e16 /base/gdevprn.c
parentdd4add1a559a232bed424c066cc373c328d82beb (diff)
downloadghostpdl-c712ee3f9c34daf98bbb8a97cc0ab8577f45810a.tar.gz
Bug 704567: Fix problem (SEGVs) with commit b12780fc66
The clist buffer devices need to forward the ret_devn_params from the target device, and the previous commit did not do this for all cases, seen with the psdcmykog device. Move the set of the memory device ret_devn_proc to the forwarding version to the shared procedure: gx_default_create_buf_device. This was not seen with the default regression -- it was encountered with the 'extended' test mode of nightly runs. TBD: The 'display_create_buf_device' needs to be checked, and probably needs a similar change if it is in a "DeviceN" configuration.
Diffstat (limited to 'base/gdevprn.c')
-rw-r--r--base/gdevprn.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/base/gdevprn.c b/base/gdevprn.c
index 0cfb453fc..41ce670f8 100644
--- a/base/gdevprn.c
+++ b/base/gdevprn.c
@@ -1414,8 +1414,16 @@ gx_default_create_buf_device(gx_device **pbdev, gx_device *target, int y,
#endif
gx_device_fill_in_procs((gx_device *)mdev);
} else {
- gs_make_mem_device(mdev, mdproto, mem, (color_usage == NULL ? 1 : 0),
- target);
+ gs_devn_params* pdevn_params;
+
+ gs_make_mem_device(mdev, mdproto, mem, (color_usage == NULL ? 1 : 0), target);
+ /* mem devices may need to refer to the target's devn_params struct */
+ /* if the device has separations already defined (by SeparationOrderNames), we */
+ /* need to use them so the colorants are in the same order as the target device. */
+ pdevn_params = dev_proc(target, ret_devn_params)(target);
+ if (pdevn_params != NULL) {
+ mdev->procs.ret_devn_params = gx_forward_ret_devn_params;
+ }
}
mdev->width = target->width;
mdev->band_y = y;