1
0
mirror of https://github.com/open-simh/simh.git synced 2026-01-13 15:27:46 +00:00

AltairZ80: 2SIO: Fix potential NULL pointer dereference.

This commit is contained in:
Howard M. Harte 2023-01-22 13:55:58 -08:00
parent 023cd3b387
commit 09899c18fa

View File

@ -546,6 +546,10 @@ static t_stat m2sio_detach(UNIT *uptr)
{ {
M2SIO_CTX *xptr; M2SIO_CTX *xptr;
if (uptr->dptr == NULL) {
return SCPE_IERR;
}
sim_debug(VERBOSE_MSG, uptr->dptr, "detach.\n"); sim_debug(VERBOSE_MSG, uptr->dptr, "detach.\n");
if (uptr->flags & UNIT_ATT) { if (uptr->flags & UNIT_ATT) {