Skip to content

Commit 33828f6

Browse files
committed
DeleteNodes(): Prevent range error below when empty array is passen. See issue #1288
1 parent 11e7b6f commit 33828f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/VirtualTrees.BaseTree.pas

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16300,6 +16300,8 @@ procedure TBaseVirtualTree.DeleteNodes(const pNodes: TNodeArray);
1630016300
I: Integer;
1630116301
LevelChange: Boolean;
1630216302
begin
16303+
if Length(pNodes) = 0 then
16304+
exit; // Prevent range error below when empty array is passen. See issue #1288
1630316305
BeginUpdate;
1630416306
try
1630516307
for I := High(pNodes) downto 1 do

0 commit comments

Comments
 (0)