From 8ef0c03fa680a02086c833a20dde56e526e32c14 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 4 Sep 2022 17:35:47 +0200 Subject: [PATCH] Prevent a crash if (due to input error) the node_table is not available. --- src/xspice/evt/evtprint.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xspice/evt/evtprint.c b/src/xspice/evt/evtprint.c index bb48cb709..87e27c596 100644 --- a/src/xspice/evt/evtprint.c +++ b/src/xspice/evt/evtprint.c @@ -727,6 +727,8 @@ static void set_all(CKTcircuit *ckt, Mif_Boolean_t val) count = ckt->evt->counts.num_nodes; node_table = ckt->evt->info.node_table; + if (!node_table) + return; for (i = 0; i < count; i++) node_table[i]->save = val; } @@ -752,7 +754,10 @@ EVTsave(wordlist *wl) fprintf(cp_err, "Error: no circuit loaded.\n"); return; } + node_table = ckt->evt->info.node_table; + if (!node_table) + return; /* Deal with "all" and "none". */