Skip to content

Commit 32042ab

Browse files
Fix unresolved optional dependencies crash the game (closes #98)
1 parent 2d2b790 commit 32042ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Loader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ private static bool SortMods(Dictionary<string, Mod> mods)
419419
{
420420
foreach (var dependency in mod.dependencies ?? Array.Empty<Mod.Dependency>())
421421
{
422+
if (!graph.ContainsKey(dependency.id)) continue;
422423
graph[dependency.id].Add(id);
423424
inDegree[id]++;
424425
}

0 commit comments

Comments
 (0)