Lua console - add a null check on close, LuaImp should never be null unless something went bonkers on load

This commit is contained in:
adelikat 2015-03-28 01:09:50 +00:00
parent 5b15638671
commit 6982df8035
1 changed files with 6 additions and 4 deletions

View File

@ -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)