Fix two crashes caused by trying to plot after circuit parsing failed.

This commit is contained in:
Giles Atkinson 2022-04-05 12:16:31 +01:00 committed by Holger Vogt
parent e16564edf7
commit bf7efb18f9
2 changed files with 2 additions and 2 deletions

View File

@ -16,5 +16,5 @@ Author: 1985 Thomas L. Quarles
GENmodel *
CKTfndMod(CKTcircuit *ckt, IFuid modname)
{
return nghash_find(ckt->MODnameHash, modname);
return ckt ? nghash_find(ckt->MODnameHash, modname) : NULL;
}

View File

@ -13,5 +13,5 @@ Author: 1985 Thomas L. Quarles
GENinstance *
CKTfndDev(CKTcircuit *ckt, IFuid name)
{
return nghash_find(ckt->DEVnameHash, name);
return ckt ? nghash_find(ckt->DEVnameHash, name) : NULL;
}