Lua console - add a null check on close, LuaImp should never be null unless something went bonkers on load
This commit is contained in:
parent
5b15638671
commit
6982df8035
|
@ -42,7 +42,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
if (AskSaveChanges())
|
if (AskSaveChanges())
|
||||||
{
|
{
|
||||||
SaveConfigSettings();
|
CloseLua();
|
||||||
GlobalWin.DisplayManager.ClearLuaSurfaces();
|
GlobalWin.DisplayManager.ClearLuaSurfaces();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -295,10 +295,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Rename me
|
private void CloseLua()
|
||||||
private void SaveConfigSettings()
|
|
||||||
{
|
{
|
||||||
LuaImp.Close();
|
if (LuaImp != null)
|
||||||
|
{
|
||||||
|
LuaImp.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static FileInfo GetFileFromUser(string filter)
|
private static FileInfo GetFileFromUser(string filter)
|
||||||
|
|
Loading…
Reference in New Issue