Skip to content

Commit 95885c1

Browse files
committed
fix: crash in grid cell paint event after disconnect
1 parent 16961d9 commit 95885c1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎source/main.pas‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11005,6 +11005,9 @@ procedure TMainForm.AnyGridAfterCellPaint(Sender: TBaseVirtualTree; TargetCanvas
1100511005
Exit;
1100611006
// Paint a red triangle at the top left corner of the cell
1100711007
Results := GridResult(Sender);
11008+
// Result sets get freed while disconnecting, a paint event may still come through then
11009+
if not Assigned(Results) then
11010+
Exit;
1100811011
RowNum := Sender.GetNodeData(Node);
1100911012
Results.RecNo := RowNum^;
1101011013
if Results.Modified(ResultCol) then

0 commit comments

Comments
 (0)