diff options
-rw-r--r-- | psi/zdevice.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/psi/zdevice.c b/psi/zdevice.c index bd2c542fb..eb6d1b1cf 100644 --- a/psi/zdevice.c +++ b/psi/zdevice.c @@ -518,6 +518,9 @@ zsetdevice(i_ctx_t *i_ctx_p) return code; check_write_type(*op, t_device); + if (op->value.pdevice == 0) + return gs_note_error(gs_error_undefined); + /* slightly icky special case: the new device may not have had * it's procs initialised, at this point - but we need to check * whether we're being asked to change the device here @@ -537,9 +540,6 @@ zsetdevice(i_ctx_t *i_ctx_p) } dev->ShowpageCount = 0; - if (op->value.pdevice == 0) - return gs_note_error(gs_error_undefined); - code = gs_setdevice_no_erase(igs, op->value.pdevice); if (code < 0) return code; |