check for null function

This commit is contained in:
Bill Currie 2003-09-18 22:50:42 +00:00
parent 9e861128ec
commit aa37db997c

View file

@ -54,6 +54,8 @@ call_function (progs_t *pr, func_t func)
{ {
dfunction_t *newf; dfunction_t *newf;
if (!func)
PR_RunError (pr, "NULL function");
newf = pr->pr_functions + func; newf = pr->pr_functions + func;
if (newf->first_statement < 0) { if (newf->first_statement < 0) {
// negative statements are built in functions // negative statements are built in functions