Skip to content

Commit

Permalink
Skip stack marking at all if c->stack is NULL.
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Apr 10, 2017
1 parent 0cb5015 commit 491d68b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ mark_context_stack(mrb_state *mrb, struct mrb_context *c)
size_t i;
size_t e;

if (c->stack == NULL) return;
e = c->stack - c->stbase;
if (c->ci) e += c->ci->nregs;
if (c->stbase + e > c->stend) e = c->stend - c->stbase;
Expand Down

0 comments on commit 491d68b

Please sign in to comment.