Always refresh the APIHawk library instances instead of checking for null, fixes #1791

This commit is contained in:
adelikat 2020-01-18 13:22:19 -06:00
parent e67cd79644
commit 1519110691
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ namespace BizHawk.Client.EmuHawk
emuHawkLibrary.MainForm = _mainForm;
}
ApiHawkContainerInstance ??= InitApiHawkContainerInstance(serviceProvider, ConsoleLuaLibrary.LogOutput);
ApiHawkContainerInstance = InitApiHawkContainerInstance(serviceProvider, ConsoleLuaLibrary.LogOutput);
if (instance is DelegatingLuaLibraryEmu dlgInstanceEmu) dlgInstanceEmu.APIs = ApiHawkContainerInstance; // this is necessary as the property has the `new` modifier
else if (instance is DelegatingLuaLibrary dlgInstance) dlgInstance.APIs = ApiHawkContainerInstance;