Commit 36a1c80d authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

uvenv(): proc->env may be NULL be before uplevel

parent 30b19048
......@@ -94,8 +94,8 @@ uvenv(mrb_state *mrb, int up)
{
struct REnv *e = mrb->ci->proc->env;
if (!e) return 0;
while (up--) {
if (!e) return 0;
e = (struct REnv*)e->c;
}
return e;
......
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