Skip to content

Commit

Permalink
EfficientSugiyamaLayoutAlgorithm Sweeping crashfix
Browse files Browse the repository at this point in the history
Avoid sweeping crash when less than 2 layers.
  • Loading branch information
Michaël Mora committed Aug 5, 2020
1 parent 13c2e2e commit 20fbe4f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public partial class EfficientSugiyamaLayoutAlgorithm<TVertex, TEdge, TGraph>
/// </summary>
private void DoCrossingMinimizations()
{
if (_layers.Count < 2)
return;

int prevCrossings = int.MaxValue;
int crossings = int.MaxValue;
int phase = 1;
Expand Down

0 comments on commit 20fbe4f

Please sign in to comment.