Lua console - fix to autoload lua session, if there is no recent session, it will open nothing, rather than cause an exception
This commit is contained in:
parent
1bedd81666
commit
8214a649c3
|
@ -94,7 +94,12 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
LoadConfigSettings();
|
LoadConfigSettings();
|
||||||
if (Global.Config.AutoLoadLuaSession)
|
if (Global.Config.AutoLoadLuaSession)
|
||||||
LoadSessionFromRecent(Global.Config.RecentLuaSession.GetRecentFileByPosition(0));
|
{
|
||||||
|
if (!Global.Config.RecentLuaSession.IsEmpty())
|
||||||
|
{
|
||||||
|
LoadSessionFromRecent(Global.Config.RecentLuaSession.GetRecentFileByPosition(0));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StopScript(int x)
|
private void StopScript(int x)
|
||||||
|
@ -390,7 +395,7 @@ namespace BizHawk.MultiClient
|
||||||
luaList.Clear();
|
luaList.Clear();
|
||||||
DisplayLuaList();
|
DisplayLuaList();
|
||||||
UpdateNumberOfScripts();
|
UpdateNumberOfScripts();
|
||||||
currentSessionFile = "";
|
currentSessionFile = "";
|
||||||
Changes(false);
|
Changes(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue