Safety for any custom or future tools that want to use this.

This commit is contained in:
SuuperW 2025-06-21 14:29:37 -05:00
parent 88cf00d4b6
commit d8bd53d1c6
1 changed files with 9 additions and 3 deletions

View File

@ -787,9 +787,15 @@ namespace BizHawk.Client.EmuHawk
// This is only caled from Lua.
_editIsFromLua = true;
BeginBatchEdit();
action();
EndBatchEdit();
_editIsFromLua = false;
try
{
action();
}
finally
{
EndBatchEdit();
_editIsFromLua = false;
}
}
/// <summary>