Remove registered functions when disabling lua scripts
This commit is contained in:
parent
1fa16cfaeb
commit
ac97e62ed1
|
@ -686,7 +686,20 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else if (!item.Enabled && item.Thread != null)
|
||||
{
|
||||
var items = SelectedItems.ToList();
|
||||
foreach (var sitem in items)
|
||||
{
|
||||
var temp = sitem;
|
||||
var functions = LuaImp.RegisteredFunctions.Where(x => x.Lua == temp.Thread).ToList();
|
||||
foreach (var function in functions)
|
||||
{
|
||||
LuaImp.RegisteredFunctions.Remove(function);
|
||||
|
||||
}
|
||||
UpdateRegisteredFunctionsDialog();
|
||||
}
|
||||
item.Stop();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue