diff options
author | Torbjörn Andersson | 2010-10-15 20:01:13 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2010-10-15 20:01:13 +0000 |
commit | 9744167adc35ea945eaef333e76696b1d6feaeb7 (patch) | |
tree | 1dc40047ad9f393c10cb17b2e42dde4fddbf96c1 | |
parent | b184d7bbdb109d1d123ebb5cf87fe3d2febe1865 (diff) | |
download | scummvm-rg350-9744167adc35ea945eaef333e76696b1d6feaeb7.tar.gz scummvm-rg350-9744167adc35ea945eaef333e76696b1d6feaeb7.tar.bz2 scummvm-rg350-9744167adc35ea945eaef333e76696b1d6feaeb7.zip |
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
-rw-r--r-- | engines/sword25/kernel/kernel_script.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sword25/kernel/kernel_script.cpp b/engines/sword25/kernel/kernel_script.cpp index 395b0e2637..a7169e9d30 100644 --- a/engines/sword25/kernel/kernel_script.cpp +++ b/engines/sword25/kernel/kernel_script.cpp @@ -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); |