mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 20:59:10 +02:00
LCL, fix AV while doing dbgrid.selectedRows.delete (and memleak under 2.6.4), issue #26913
git-svn-id: trunk@46637 -
This commit is contained in:
parent
30ba201a13
commit
9d659a9b1f
@ -4235,13 +4235,15 @@ begin
|
||||
{$ifdef dbgDBGrid}
|
||||
DebugLn('%s.Delete', [ClassName]);
|
||||
{$endif}
|
||||
for i := 0 to FList.Count - 1 do begin
|
||||
for i := FList.Count-1 downto 0 do begin
|
||||
FDataset.GotoBookmark(Items[i]);
|
||||
FDataset.Delete;
|
||||
{$ifndef noautomatedbookmark}
|
||||
Bookmark := FList[i];
|
||||
SetLength(TBookmark(Bookmark),0); // decrease reference count
|
||||
{$else}
|
||||
FDataset.FreeBookmark(Items[i]);
|
||||
{$endif noautomatedbookmark}
|
||||
FDataset.Delete;
|
||||
FList.Delete(i);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user