safeguard against circuit not being abvailable,

avoid crash
This commit is contained in:
Holger Vogt 2022-09-18 11:11:56 +02:00
parent 8dba70c7cc
commit 453350bf2f
1 changed files with 4 additions and 1 deletions

View File

@ -627,8 +627,11 @@ int EVTswitch_plot(CKTcircuit* ckt, const char* plottypename) {
Evt_Job_t* jobs;
Evt_Data_t* data;
if (!ckt)
return (E_NOTFOUND);
if (ckt->evt->counts.num_insts == 0)
return(OK);
return(E_NOTFOUND);
jobs = &(ckt->evt->jobs);
data = &(ckt->evt->data);