From 8dc300fc2cc5a0df82d59bf4f6b3e7b0e2e79bdf Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 5 Nov 2013 22:38:03 +0000 Subject: Fix work with lua 5.2 eventually. --- src/lua/lua_common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lua/lua_common.h') diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h index e2e2f032a..fd4058c11 100644 --- a/src/lua/lua_common.h +++ b/src/lua/lua_common.h @@ -23,7 +23,9 @@ static inline void luaL_register (lua_State *L, const gchar *name, const struct luaL_reg *methods) { - lua_newtable (L); + if (name != NULL) { + lua_newtable (L); + } luaL_setfuncs (L, methods, 0); if (name != NULL) { lua_pushvalue (L, -1); -- cgit v1.2.3