summaryrefslogtreecommitdiff
path: root/gs/contrib/pcl3/src/gdevpcl3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gs/contrib/pcl3/src/gdevpcl3.c')
-rw-r--r--gs/contrib/pcl3/src/gdevpcl3.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gs/contrib/pcl3/src/gdevpcl3.c b/gs/contrib/pcl3/src/gdevpcl3.c
index 5a2233962..7514c04c5 100644
--- a/gs/contrib/pcl3/src/gdevpcl3.c
+++ b/gs/contrib/pcl3/src/gdevpcl3.c
@@ -1301,9 +1301,11 @@ static int pcl3_open_device(gx_device *device)
/* if device has been subclassed (FirstPage/LastPage device) then make sure we use
* the subclassed device.
*/
- if (device->child)
+ while (device->child)
device = device->child;
+ dev = (pcl3_Device *)device;
+
/* Fill the still unassigned parts of 'file_data' from the other data */
{
pcl_FileData *data = &dev->file_data;