Commit b97c6d10 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2801 from carsonmcdonald/fix2779

Add locals null checks
parents a94ff966 3e911a8e
......@@ -239,7 +239,9 @@ local_nest(parser_state *p)
static void
local_unnest(parser_state *p)
{
p->locals = p->locals->cdr;
if (p->locals) {
p->locals = p->locals->cdr;
}
}
static mrb_bool
......@@ -261,7 +263,9 @@ local_var_p(parser_state *p, mrb_sym sym)
static void
local_add_f(parser_state *p, mrb_sym sym)
{
p->locals->car = push(p->locals->car, nsym(sym));
if (p->locals) {
p->locals->car = push(p->locals->car, nsym(sym));
}
}
static void
......
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