c (mrbc_context) may be NULL; fix #3787

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-08-22 09:47:10 +09:00
parent ab3b6dbd2a
commit 0d865a77d5
+1 -1
View File
@@ -5775,7 +5775,7 @@ mrb_load_exec(mrb_state *mrb, struct mrb_parser_state *p, mrbc_context *c)
return mrb_undef_value();
}
if (!p->tree || p->nerr) {
c->parser_nerr = p->nerr;
if (c) c->parser_nerr = p->nerr;
if (p->capture_errors) {
char buf[256];
int n;