Commit 3e911a8e authored by Carson McDonald's avatar Carson McDonald

Add locals null checks

parent 4f6bae61
......@@ -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