cktdest.c, xspice, set g_mif_info.ckt = NULL
when destroying/remcirc'ing a circuit to avoid a crash in EVTfindvec() which might try to access fields in the destroyed CKTcircuit ( excercise: tran, remcirc, load rawfile, plot something_nonexistant )
This commit is contained in:
parent
0252f7b9cb
commit
236b99f2b1
|
|
@ -17,6 +17,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
#ifdef XSPICE
|
||||
#include "ngspice/evtproto.h"
|
||||
#include "ngspice/mif.h"
|
||||
#endif
|
||||
|
||||
int
|
||||
|
|
@ -77,5 +78,10 @@ CKTdestroy(CKTcircuit *ckt)
|
|||
nghash_free(ckt->DEVnameHash, NULL, NULL);
|
||||
nghash_free(ckt->MODnameHash, NULL, NULL);
|
||||
FREE(ckt);
|
||||
|
||||
#ifdef XSPICE
|
||||
g_mif_info.ckt = NULL;
|
||||
#endif
|
||||
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue