diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2020-07-27 12:46:02 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2020-07-29 13:47:26 +0100 |
commit | 9beae99074655cf78729d5e26862f00cea11b109 (patch) | |
tree | bebfc243b1665bbea4f9b5e069d3dc56bd4c798c /base/gsdevice.c | |
parent | 6179b719348c1622352b55d66599ba26cfba9d3d (diff) | |
download | ghostpdl-9beae99074655cf78729d5e26862f00cea11b109.tar.gz |
Ensure we can call dev_spec_op as soon as device is created
Since we can legitimately want to interrogate a device for its capabilities and
preferences right from its creation, ensure the dev_spec_op is valid as soon
as the device is created.
Diffstat (limited to 'base/gsdevice.c')
-rw-r--r-- | base/gsdevice.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/base/gsdevice.c b/base/gsdevice.c index 4a6db9930..913119495 100644 --- a/base/gsdevice.c +++ b/base/gsdevice.c @@ -417,6 +417,11 @@ gs_copydevice2(gx_device ** pnew_dev, const gx_device * dev, bool keep_open, */ new_dev->is_open = dev->is_open && keep_open; fill_dev_proc(new_dev, finish_copydevice, gx_default_finish_copydevice); + /* We really want to be able to interrogate the device for capabilities + * and/or preferences right from when it is created, so set dev_spec_op + * now (if not already set). + */ + fill_dev_proc(new_dev, dev_spec_op, gx_default_dev_spec_op); code = dev_proc(new_dev, finish_copydevice)(new_dev, dev); if (code < 0) { gs_free_object(mem, new_dev, "gs_copydevice(device)"); |