Skip to content

Commit 6dccd7d

Browse files
committed
FlightPlanner: prevent exception
1 parent 9257ecf commit 6dccd7d

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

GCSViews/FlightPlanner.cs

+8-4
Original file line numberDiff line numberDiff line change
@@ -5280,11 +5280,15 @@ private Dictionary<string, string[]> readCMDXML()
52805280
//Load additional commands from config.xml and merge it with cmd
52815281
try
52825282
{
5283-
Dictionary<string, string[]> configCommands = new Dictionary<string, string[]>();
5284-
configCommands = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(Settings.Instance["PlannerExtraCommand"]);
5285-
var newCmdList = cmd.Concat(configCommands.Where(kvp => !cmd.ContainsKey(kvp.Key))).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
5286-
return newCmdList;
5283+
if (Settings.Instance["PlannerExtraCommand"] != null)
5284+
{
5285+
Dictionary<string, string[]> configCommands = new Dictionary<string, string[]>();
5286+
configCommands = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(Settings.Instance["PlannerExtraCommand"]);
5287+
var newCmdList = cmd.Concat(configCommands.Where(kvp => !cmd.ContainsKey(kvp.Key))).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
5288+
return newCmdList;
5289+
}
52875290

5291+
return cmd;
52885292
}
52895293
catch
52905294
{

appveyor.yml

-6
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ artifacts:
4949
- path: ChangeLog.txt
5050
deploy: off
5151
notifications:
52-
- provider: Webhook
53-
url: https://webhooks.gitter.im/e/c7f1e74edef028cfa905
54-
method: POST
55-
on_build_success: true
56-
on_build_failure: false
57-
on_build_status_changed: false
5852
- provider: GitHubPullRequest
5953
on_build_success: true
6054
on_build_failure: true

0 commit comments

Comments
 (0)