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:
rlar 2017-01-08 18:08:17 +01:00
parent c3275241a5
commit 5905ed26fa
1 changed files with 4 additions and 1 deletions

View File

@ -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);