From 3cb293895da6e734c016940485048a27e3c90202 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Wed, 12 Oct 2022 17:07:53 +0000 Subject: [PATCH] tvplanit: Fix Ganttview crash at designtime introduced by previous commit. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8544 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vpganttview.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);