From 01b55f14dce2fe0d948152eb066e96e9385e8bab Mon Sep 17 00:00:00 2001 From: bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Wed, 25 Feb 2015 19:10:32 +0000 Subject: [PATCH] TCheckListBox: fix possible crash introduced in r47992 #62711a2bb8. git-svn-id: trunk@47993 - --- lcl/checklst.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcl/checklst.pas b/lcl/checklst.pas index 0fc33e05ab..b91604d3f5 100644 --- a/lcl/checklst.pas +++ b/lcl/checklst.pas @@ -302,7 +302,7 @@ begin if (Key = VK_SPACE) and (Shift=[]) then begin //Delphi (7) sets ItemIndex to 0 in this case and fires OnClick - if (ItemIndex < 0) and (Items.Count >= 0) then + if (ItemIndex < 0) and (Items.Count > 0) then begin ItemIndex := 0; Click;