Browse Source

Fail with null value instead of other exception in case of invalid json file.

pull/1010/head
Siegfried Pammer 8 years ago
parent
commit
f493f5e606
  1. 2
      ICSharpCode.Decompiler/DotNetCore/DotNetCorePathFinder.cs

2
ICSharpCode.Decompiler/DotNetCore/DotNetCorePathFinder.cs

@ -93,7 +93,7 @@ namespace ICSharpCode.Decompiler @@ -93,7 +93,7 @@ namespace ICSharpCode.Decompiler
foreach (var library in libraries) {
var type = library.Value["type"].AsString;
var path = library.Value["path"].AsString;
var runtimeInfo = runtimeInfos[library.Key]["runtime"].AsJsonObject;
var runtimeInfo = runtimeInfos[library.Key].AsJsonObject?["runtime"].AsJsonObject;
string[] components = new string[runtimeInfo?.Count ?? 0];
if (runtimeInfo != null) {
int i = 0;

Loading…
Cancel
Save