error when apply got non-proc at the first place of arguments

This commit is contained in:
Yuichi Nishiwaki 2013-11-14 20:42:14 +09:00
parent 23ebe14da0
commit 066575fa1c
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,10 @@ pic_proc_apply(pic_state *pic)
pic_get_args(pic, "oo", &proc, &args); pic_get_args(pic, "oo", &proc, &args);
if (! pic_proc_p(proc)) {
pic_error(pic, "apply: expected procedure");
}
return pic_apply(pic, pic_proc_ptr(proc), args); return pic_apply(pic, pic_proc_ptr(proc), args);
} }