summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-08-22 09:47:10 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-08-22 09:47:10 +0900
commit0d865a77d5b655f39330e690dcae7fb98119fdca (patch)
tree04aed2fcb761ff85f5f17c9dcc87667114274352 /mrbgems/mruby-compiler
parentab3b6dbd2ae59838b36f16fed5a635903d9f42a9 (diff)
downloadmruby-0d865a77d5b655f39330e690dcae7fb98119fdca.tar.gz
mruby-0d865a77d5b655f39330e690dcae7fb98119fdca.zip
`c` (`mrbc_context`) may be NULL; fix #3787
Diffstat (limited to 'mrbgems/mruby-compiler')
-rw-r--r--mrbgems/mruby-compiler/core/parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index ed0ee1457..884c90cf5 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -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;