summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lua/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/lauxlib.c')
-rw-r--r--apps/plugins/lua/lauxlib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/plugins/lua/lauxlib.c b/apps/plugins/lua/lauxlib.c
index b8332427f0..9a5939aff9 100644
--- a/apps/plugins/lua/lauxlib.c
+++ b/apps/plugins/lua/lauxlib.c
@@ -803,8 +803,10 @@ static int panic (lua_State *L) {
LUALIB_API lua_State *luaL_newstate (void) {
lua_State *L = lua_newstate(l_alloc, NULL);
- lua_setallocf(L, l_alloc, L); /* allocator needs lua_State. */
- if (L) lua_atpanic(L, &panic);
+ if (L){
+ lua_setallocf(L, l_alloc, L); /* allocator needs lua_State. */
+ lua_atpanic(L, &panic);
+ }
return L;
}