diff --git a/AltairZ80/s100_2sio.c b/AltairZ80/s100_2sio.c index 6c4ca125..89cacc1d 100644 --- a/AltairZ80/s100_2sio.c +++ b/AltairZ80/s100_2sio.c @@ -546,6 +546,10 @@ static t_stat m2sio_detach(UNIT *uptr) { M2SIO_CTX *xptr; + if (uptr->dptr == NULL) { + return SCPE_IERR; + } + sim_debug(VERBOSE_MSG, uptr->dptr, "detach.\n"); if (uptr->flags & UNIT_ATT) {