diff options
Diffstat (limited to 'devices/vector/gdevpdfu.c')
-rw-r--r-- | devices/vector/gdevpdfu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/devices/vector/gdevpdfu.c b/devices/vector/gdevpdfu.c index f12fa38e..9545bd58 100644 --- a/devices/vector/gdevpdfu.c +++ b/devices/vector/gdevpdfu.c @@ -1589,10 +1589,15 @@ pdf_begin_aside(gx_device_pdf * pdev, pdf_resource_t ** plist, pdf_resource_type_t type) { long id = pdf_begin_separate(pdev, type); + int code = 0; if (id < 0) return (int)id; - return pdf_alloc_aside(pdev, plist, pst, ppres, id); + code = pdf_alloc_aside(pdev, plist, pst, ppres, id); + if (code < 0) + (void)pdf_end_separate(pdev, type); + + return code; } /* Begin a resource of a given type. */ |