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:
parent
fe369e0455
commit
a9eeac6d64
|
@ -151,9 +151,8 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
public Lua SpawnCoroutine(string File)
|
public Lua SpawnCoroutine(string File)
|
||||||
{
|
{
|
||||||
LuaConsole Luas = new LuaConsole();
|
|
||||||
var t = lua.NewThread();
|
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);
|
var main = t.LoadFile(File);
|
||||||
t.Push(main); //push main function on to stack for subsequent resuming
|
t.Push(main); //push main function on to stack for subsequent resuming
|
||||||
return t;
|
return t;
|
||||||
|
|
Loading…
Reference in New Issue