Unverified Commit 5acd802d authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4956 from dearblue/null-local_variables

Fix NULL pointer dereferences in mrb_local_variables; fix #4955
parents 0dacc9a6 9b15860d
......@@ -139,7 +139,7 @@ mrb_local_variables(mrb_state *mrb, mrb_value self)
proc = mrb->c->ci[-1].proc;
if (MRB_PROC_CFUNC_P(proc)) {
if (proc == NULL || MRB_PROC_CFUNC_P(proc)) {
return mrb_ary_new(mrb);
}
vars = mrb_hash_new(mrb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment