Lua - fix bug that was causing lua functions to duplicate each time a lua script was toggled or opened, eventually causing crashes.

This commit is contained in:
adelikat 2012-06-04 02:33:34 +00:00
parent fe369e0455
commit a9eeac6d64
1 changed files with 1 additions and 2 deletions

View File

@ -151,9 +151,8 @@ namespace BizHawk.MultiClient
public Lua SpawnCoroutine(string File)
{
LuaConsole Luas = new LuaConsole();
var t = lua.NewThread();
LuaRegister(t);
//LuaRegister(t); //adelikat: Not sure why this was here but it was causing the entire luaimplmeentaiton to be duplicated each time, eventually resulting in crashes
var main = t.LoadFile(File);
t.Push(main); //push main function on to stack for subsequent resuming
return t;