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 3097795c..8010221f 100644 --- a/src/lj_err.c +++ b/src/lj_err.c | |||
@@ -499,8 +499,7 @@ static ptrdiff_t finderrfunc(lua_State *L) | |||
499 | { | 499 | { |
500 | cTValue *frame = L->base-1, *bot = tvref(L->stack); | 500 | cTValue *frame = L->base-1, *bot = tvref(L->stack); |
501 | void *cf = L->cframe; | 501 | void *cf = L->cframe; |
502 | while (frame > bot) { | 502 | while (frame > bot && cf) { |
503 | lua_assert(cf != NULL); | ||
504 | while (cframe_nres(cframe_raw(cf)) < 0) { /* cframe without frame? */ | 503 | while (cframe_nres(cframe_raw(cf)) < 0) { /* cframe without frame? */ |
505 | if (frame >= restorestack(L, -cframe_nres(cf))) | 504 | if (frame >= restorestack(L, -cframe_nres(cf))) |
506 | break; | 505 | break; |