diff --git a/src/spicelib/parser/inpptree.c b/src/spicelib/parser/inpptree.c index 4828c8fd4..398771048 100644 --- a/src/spicelib/parser/inpptree.c +++ b/src/spicelib/parser/inpptree.c @@ -1112,6 +1112,11 @@ INPparseNode *PT_mkfnode(const char *fname, INPparseNode * arg) return mkfirst(NULL, arg); } + if (!arg) { + fprintf(stderr, "Error: bad function arguments \n"); + return mkfirst(NULL, arg); + } + /* Make sure the case is ok. */ (void)strncpy(buf, fname, 127); buf[127] = 0;