From 9a0f0dcc77adbde0618af1f10e5d430f42b76cc2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 2 May 2002 10:06:20 -0300 Subject: precompiler may create functions without `lineinfo' --- lfunc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lfunc.c') diff --git a/lfunc.c b/lfunc.c index 205f39b6..720fb6e4 100644 --- a/lfunc.c +++ b/lfunc.c @@ -1,5 +1,5 @@ /* -** $Id: lfunc.c,v 1.54 2002/03/05 12:42:47 roberto Exp roberto $ +** $Id: lfunc.c,v 1.55 2002/03/25 17:47:14 roberto Exp roberto $ ** Auxiliary functions to manipulate prototypes and closures ** See Copyright Notice in lua.h */ @@ -98,7 +98,8 @@ Proto *luaF_newproto (lua_State *L) { void luaF_freeproto (lua_State *L, Proto *f) { luaM_freearray(L, f->code, f->sizecode, Instruction); - luaM_freearray(L, f->lineinfo, f->sizecode, int); + if (f->lineinfo) + luaM_freearray(L, f->lineinfo, f->sizecode, int); luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar); luaM_freearray(L, f->k, f->sizek, TObject); luaM_freearray(L, f->p, f->sizep, Proto *); -- cgit v1.2.3-55-g6feb