summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/lparser.c')
-rw-r--r--apps/plugins/lua/lparser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugins/lua/lparser.c b/apps/plugins/lua/lparser.c
index 23d3972036..06c62cedde 100644
--- a/apps/plugins/lua/lparser.c
+++ b/apps/plugins/lua/lparser.c
@@ -359,6 +359,8 @@ static void open_func (LexState *ls, FuncState *fs) {
static void close_func (LexState *ls) {
+ if (!ls || !ls->fs || !ls->fs->f)
+ return;
lua_State *L = ls->L;
FuncState *fs = ls->fs;
Proto *f = fs->f;