From 451b53daeb64b85eab999b29dba5fd9c78598422 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato <mark@infocomm.com> Date: Tue, 24 May 2016 08:53:05 -0700 Subject: [PATCH] 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. --- sim_tmxr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sim_tmxr.c b/sim_tmxr.c index 4397b76e..6efff478 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -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; }