Prevent a crash if (due to input error) the node_table is not available.

This commit is contained in:
Holger Vogt 2022-09-04 17:35:47 +02:00
parent c7fa70d109
commit 8ef0c03fa6
1 changed files with 5 additions and 0 deletions

View File

@ -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". */