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:
bart 2013-03-13 14:12:57 +00:00
parent 60d065f8a9
commit b36ca5958c

View File

@ -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;