diff options
-rw-r--r-- | src/lj_err.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lj_err.c b/src/lj_err.c index d37df310..07afc580 100644 --- a/src/lj_err.c +++ b/src/lj_err.c | |||
@@ -500,8 +500,7 @@ static ptrdiff_t finderrfunc(lua_State *L) | |||
500 | { | 500 | { |
501 | cTValue *frame = L->base-1, *bot = tvref(L->stack); | 501 | cTValue *frame = L->base-1, *bot = tvref(L->stack); |
502 | void *cf = L->cframe; | 502 | void *cf = L->cframe; |
503 | while (frame > bot) { | 503 | while (frame > bot && cf) { |
504 | lua_assert(cf != NULL); | ||
505 | while (cframe_nres(cframe_raw(cf)) < 0) { /* cframe without frame? */ | 504 | while (cframe_nres(cframe_raw(cf)) < 0) { /* cframe without frame? */ |
506 | if (frame >= restorestack(L, -cframe_nres(cf))) | 505 | if (frame >= restorestack(L, -cframe_nres(cf))) |
507 | break; | 506 | break; |