diff --git a/components/tvplanit/source/vpganttview.pas b/components/tvplanit/source/vpganttview.pas index 18d23d34f..d5625d58e 100644 --- a/components/tvplanit/source/vpganttview.pas +++ b/components/tvplanit/source/vpganttview.pas @@ -982,7 +982,7 @@ var begin inherited; - if (FRowHeight > 0) and (FEventRecords.Count > 0) then + if (FRowHeight > 0) and Assigned(FEventRecords) and (FEventRecords.Count > 0) then begin VisibleRows := CalcVisibleRows(ClientHeight, FTotalColHeaderHeight, FRowHeight); emptyRows := VisibleRows - (FEventRecords.Count - FTopRow);