Skip to content

Commit

Permalink
fix dependency sorting not removing the node its processing (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
snixtho authored Sep 29, 2024
1 parent f8ac60d commit 807fc5e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/EvoSC.Modules/Util/SortedModuleCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ private List<T> GetSortedModules()
selected = dependent.Key;
}

if (selected != null)
{
dependencyGraph.Remove(selected);
}
else
if (selected == null)
{
break;
}
Expand All @@ -78,6 +74,11 @@ private static void RemoveDependent(DependencyGraph dependencyGraph, KeyValuePai
dependencies.Value.Remove(dependent.Key);
}
}

if (dependencyGraph.ContainsKey(dependent.Key))
{
dependencyGraph.Remove(dependent.Key);
}
}

private DependencyGraph MakeDependencyGraph()
Expand Down

0 comments on commit 807fc5e

Please sign in to comment.