mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 19:39:18 +02:00
DBGrids: fix crash in PrepareCellHints when DataLink is not Active.
Patch by Petr-K. Fixes issue #0024028. git-svn-id: trunk@40543 -
This commit is contained in:
parent
60d065f8a9
commit
b36ca5958c
@ -1361,12 +1361,14 @@ end;
|
||||
|
||||
procedure TCustomDBGrid.PrepareCellHints(ACol, ARow: Integer);
|
||||
begin
|
||||
if not DataLink.Active then Exit;
|
||||
FSavedRecord := DataLink.ActiveRecord;
|
||||
DataLink.ActiveRecord := ARow - FixedRows;
|
||||
end;
|
||||
|
||||
procedure TCustomDBGrid.UnprepareCellHints;
|
||||
begin
|
||||
if not DataLink.Active then Exit;
|
||||
DataLink.ActiveRecord := FSavedRecord;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user