Browse Source

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
pre-master-46
Holger Vogt 4 years ago
parent
commit
54eb12de39
  1. 3
      src/frontend/typesdef.c

3
src/frontend/typesdef.c

@ -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…
Cancel
Save