Skip to content

Commit

Permalink
DeleteNodes(): Prevent range error below when empty array is passen. …
Browse files Browse the repository at this point in the history
…See issue #1288
  • Loading branch information
joachimmarder committed Dec 29, 2024
1 parent 11e7b6f commit 33828f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/VirtualTrees.BaseTree.pas
Original file line number Diff line number Diff line change
Expand Up @@ -16300,6 +16300,8 @@ procedure TBaseVirtualTree.DeleteNodes(const pNodes: TNodeArray);
I: Integer;
LevelChange: Boolean;
begin
if Length(pNodes) = 0 then
exit; // Prevent range error below when empty array is passen. See issue #1288
BeginUpdate;
try
for I := High(pNodes) downto 1 do
Expand Down

0 comments on commit 33828f6

Please sign in to comment.