inpgmod.c, INPgetMod(), bug fix, missing 'model' assignment
'model' is a return value, and must always be assigned to. NULL denotes the error case.
This commit is contained in:
parent
c3275241a5
commit
5905ed26fa
|
|
@ -292,7 +292,10 @@ char *INPgetMod(CKTcircuit *ckt, char *name, INPmodel ** model, INPtables * tab)
|
|||
|
||||
if (! modtmp->INPmodfast) { /* Check if model is already defined */
|
||||
error = create_model( ckt, modtmp, tab );
|
||||
if ( error ) return INPerror(error);
|
||||
if ( error ) {
|
||||
*model = NULL;
|
||||
return INPerror(error);
|
||||
}
|
||||
}
|
||||
*model = modtmp;
|
||||
return (NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue