mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix exception on load when starting with no arguments
This commit is contained in:
parent
c9e15cf7db
commit
3e02500f4d
@ -33,7 +33,7 @@ namespace Wabbajack
|
||||
public static MainSettings LoadSettings()
|
||||
{
|
||||
string[] args = Environment.GetCommandLineArgs();
|
||||
if (!File.Exists(Filename) || args[1] == "nosettings") return new MainSettings();
|
||||
if (!File.Exists(Filename) || args.Length > 1 && args[1] == "nosettings") return new MainSettings();
|
||||
return JsonConvert.DeserializeObject<MainSettings>(File.ReadAllText(Filename));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user