From 493d0f8214bdf42b8a82261e300176d4e003eb37 Mon Sep 17 00:00:00 2001 From: Kyzentun Date: Mon, 18 Aug 2014 11:26:05 -0600 Subject: [PATCH] Fixed CreateMethodTable to create a new table even when something of that name exists, so that the previously existing one that might have been modified by a theme is removed when changing themes. --- src/LuaBinding.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/LuaBinding.cpp b/src/LuaBinding.cpp index 0c7aa4dc21..b426c300f7 100644 --- a/src/LuaBinding.cpp +++ b/src/LuaBinding.cpp @@ -156,11 +156,6 @@ void LuaBinding::Register( lua_State *L ) void LuaBinding::CreateMethodsTable( lua_State *L, const RString &sName ) { - lua_getfield( L, LUA_GLOBALSINDEX, sName ); - if( !lua_isnil(L, -1) ) - return; - - lua_pop( L, 1 ); lua_newtable( L ); lua_pushvalue( L, -1 ); lua_setfield( L, LUA_GLOBALSINDEX, sName );