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.

This commit is contained in:
Kyzentun
2014-08-18 11:26:05 -06:00
parent 479f93c807
commit 493d0f8214
-5
View File
@@ -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 );