From 453350bf2ff62832132cf3e858ac97d73a67e592 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 18 Sep 2022 11:11:56 +0200 Subject: [PATCH] safeguard against circuit not being abvailable, avoid crash --- src/xspice/evt/evtsetup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xspice/evt/evtsetup.c b/src/xspice/evt/evtsetup.c index a0a3bd314..606c7959e 100644 --- a/src/xspice/evt/evtsetup.c +++ b/src/xspice/evt/evtsetup.c @@ -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);