SIGSEGV in TCustomDBGrid.PrepareCellHints
Original Reporter info from Mantis: Petr-K
-
Reporter name:
Original Reporter info from Mantis: Petr-K
- Reporter name:
Description:
If Datalink is not Active (Dataset is closed) and I move mouse pointer over
DBGrid, then I get SIGSEGV. Grid.ShowHint is true;
Here is little patch to resolve it.
Index: dbgrids.pas
===================================================================
--- dbgrids.pas (revision 39991)
+++ dbgrids.pas (working copy)
@@ -1354,12 +1354,16 @@
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;
Mantis conversion info:
- Mantis ID: 24028
- Build: #39991 (closed)
- Version: 1.1 (SVN)
- Fixed in version: 1.1 (SVN)
- Fixed in revision: r40543 (#b36ca595)