Fix mod switching failing when launchArgs is null.
This commit is contained in:
@@ -470,10 +470,8 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var argsString = mod.LaunchArgs.Append(launchArguments)
|
var args = launchArguments != null ? mod.LaunchArgs.Append(launchArguments) : mod.LaunchArgs;
|
||||||
.Select(a => "\"" + a + "\"").JoinWith(" ");
|
var p = Process.Start(mod.LaunchPath, args.Select(a => "\"" + a + "\"").JoinWith(" "));
|
||||||
|
|
||||||
var p = Process.Start(mod.LaunchPath, argsString);
|
|
||||||
if (p == null || p.HasExited)
|
if (p == null || p.HasExited)
|
||||||
onFailed();
|
onFailed();
|
||||||
else
|
else
|
||||||
@@ -482,8 +480,10 @@ namespace OpenRA
|
|||||||
Exit();
|
Exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Log.Write("debug", "Failed to switch to external mod.");
|
||||||
|
Log.Write("debug", "Error was: " + e.Message);
|
||||||
onFailed();
|
onFailed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user