diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2018-09-04 23:18:46 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2018-09-04 23:18:46 +0100 |
commit | 5812b1b78fc4d36fdc293b7859de69241140d590 (patch) | |
tree | dc23a936a56b6b8f6c23d9deb68db7e9f83836a1 | |
parent | bc3df0773fccf4b4906a3e59652ad646ea0fee91 (diff) | |
download | ghostpdl-5812b1b78fc4d36fdc293b7859de69241140d590.tar.gz |
Bug 699714: retain .LockSafetyParams through failed .installpagedevice
In the event that the .trysetparams fails during .installpagedevice, catch the
error, and ensure that at least the .LockSafetyParams is set.
-rw-r--r-- | Resource/Init/gs_setpd.ps | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps index bba3c8c0e..aee96149e 100644 --- a/Resource/Init/gs_setpd.ps +++ b/Resource/Init/gs_setpd.ps @@ -95,12 +95,19 @@ level2dict begin { % Since setpagedevice doesn't create new device objects, % we must (carefully) reinstall the old parameters in % the same device. - .currentpagedevice pop //null currentdevice //null .trysetparams + .currentpagedevice pop //null currentdevice //null + {.trysetparams} .internalstopped + { + //null + } if dup type /booleantype eq { pop pop } - { % This should never happen! + { SETPDDEBUG { (Error in .trysetparams!) = pstack flush } if cleartomark pop pop pop + % if resetting the entire device state failed, at least put back the se + currentdevice //null //false mark /.LockSafetyParams .currentpagedevice pop + /.LockSafetyParams .knownget not {//false} if .putdeviceparamsonly /.installpagedevice cvx /rangecheck signalerror } ifelse pop pop |