diff options
Diffstat (limited to 'mailbox/xscript-stream.c')
-rw-r--r-- | mailbox/xscript-stream.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mailbox/xscript-stream.c b/mailbox/xscript-stream.c index 51e201604..993047560 100644 --- a/mailbox/xscript-stream.c +++ b/mailbox/xscript-stream.c @@ -201,7 +201,10 @@ _xscript_ctl (struct _mu_stream *str, int op, void *arg) case MU_IOCTL_SWAP_STREAM: if (!arg) return EINVAL; - status = mu_stream_ioctl (sp->transport, op, arg); + if (!sp->transport) + status = ENOSYS; + else + status = mu_stream_ioctl (sp->transport, op, arg); if (status == EINVAL || status == ENOSYS) { mu_stream_t *pstr = arg; |