Fix a bug: Crash when 'settype @d1[id]' is given,
but simulation is not yet run. Add a better check for having at least one simulation run
This commit is contained in:
parent
1ce0066d3b
commit
54eb12de39
|
|
@ -12,7 +12,6 @@ Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group
|
|||
#include "ngspice/ftedefs.h"
|
||||
#include "ngspice/dvec.h"
|
||||
#include "ngspice/sim.h"
|
||||
#include "ngspice/tskdefs.h"
|
||||
#include "typesdef.h"
|
||||
|
||||
|
||||
|
|
@ -360,7 +359,7 @@ com_stype(wordlist *wl)
|
|||
|
||||
for (wl = wl->wl_next; wl; wl = wl->wl_next) {
|
||||
const char* vecname = wl->wl_word;
|
||||
if (*vecname == '@'&& !ft_curckt->ci_curTask->jobs) {
|
||||
if (*vecname == '@'&& !ft_curckt->ci_runonce) {
|
||||
fprintf(cp_err, "Warning: Vector %s is available only after the simulation has been run!\n", vecname);
|
||||
fprintf(cp_err, " Command 'settype %s %s' is ignored\n\n", type, vecname);
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue