TMXR: Allow Line based logging to be both disabled and enabled before attach

Previously attempts to disable logging for an unattached mux (or line) could
crash the simulator.
This commit is contained in:
Mark Pizzolato 2016-05-24 08:53:05 -07:00
parent ae6f3b97e4
commit 451b53daeb

View file

@ -4456,7 +4456,8 @@ if (lp->txlog) { /* logging? */
lp->txlog = NULL;
lp->txlogname = NULL;
}
lp->mp->uptr->filename = tmxr_mux_attach_string (lp->mp->uptr->filename, lp->mp);
if (mp->uptr)
lp->mp->uptr->filename = tmxr_mux_attach_string (lp->mp->uptr->filename, lp->mp);
return SCPE_OK;
}