mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-07 11:09:41 +01:00
TLvlGraph: Avoid crash on empty level
git-svn-id: trunk@60877 -
This commit is contained in:
parent
a807d6cb5a
commit
7a5bb3650c
@ -1284,7 +1284,8 @@ begin
|
||||
Cnt:=0;
|
||||
for i:=0 to length(Levels)-1 do begin
|
||||
Level:=Levels[i];
|
||||
SetLength(Level.Pairs,length(Level.Nodes)-1);
|
||||
if length(Level.Nodes) > 0 then
|
||||
SetLength(Level.Pairs,length(Level.Nodes)-1);
|
||||
for n:=0 to length(Level.Pairs)-1 do begin
|
||||
if First then begin
|
||||
Pair:=TMinXPair.Create(Level,n);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user