Skip to content

Commit

Permalink
Fix Netkan swinfo transformer null list error
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Jul 27, 2023
1 parent 83b6e7d commit c556475
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Netkan/Transformers/SpaceWarpInfoTransformer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ public IEnumerable<Metadata> Transform(Metadata metadata, TransformOptions opts)
log.InfoFormat("Found compatibility: {0}–{1}", minVer, maxVer);
ModuleService.ApplyVersions(json, null, minVer, maxVer);
}
var moduleDeps = mod.depends.Select(r => (r as ModuleRelationshipDescriptor)?.name)
.Where(ident => ident != null)
.ToHashSet();
var moduleDeps = (mod.depends?.Select(r => (r as ModuleRelationshipDescriptor)?.name)
.Where(ident => ident != null)
?? Enumerable.Empty<string>())
.ToHashSet();
var missingDeps = swinfo.dependencies
.Select(dep => dep.id)
.Where(depId => !moduleDeps.Contains(
Expand Down

0 comments on commit c556475

Please sign in to comment.