SWORD25: Fix infinite recursion
If I understand this, we don't need to call Kernel::GetInstance() when we are already in the Kernel class. In this particular case, _RegisterScriptBindings() is called from the Kernel constructor, so it gets called again and again because _Instance hasn't yet been set. svn-id: r53512
This commit is contained in:
parent
b184d7bbdb
commit
9744167adc
1 changed files with 1 additions and 1 deletions
|
@ -723,7 +723,7 @@ static const luaL_reg PERSISTENCE_FUNCTIONS[] = {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
bool Kernel::_RegisterScriptBindings() {
|
||||
ScriptEngine *pScript = Kernel::GetInstance()->GetScript();
|
||||
ScriptEngine *pScript = GetScript();
|
||||
BS_ASSERT(pScript);
|
||||
lua_State *L = static_cast<lua_State *>(pScript->getScriptObject());
|
||||
BS_ASSERT(L);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue