mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 20:59:12 +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);
|
procedure TCustomDBGrid.PrepareCellHints(ACol, ARow: Integer);
|
||||||
begin
|
begin
|
||||||
|
if not DataLink.Active then Exit;
|
||||||
FSavedRecord := DataLink.ActiveRecord;
|
FSavedRecord := DataLink.ActiveRecord;
|
||||||
DataLink.ActiveRecord := ARow - FixedRows;
|
DataLink.ActiveRecord := ARow - FixedRows;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomDBGrid.UnprepareCellHints;
|
procedure TCustomDBGrid.UnprepareCellHints;
|
||||||
begin
|
begin
|
||||||
|
if not DataLink.Active then Exit;
|
||||||
DataLink.ActiveRecord := FSavedRecord;
|
DataLink.ActiveRecord := FSavedRecord;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user