TCheckListBox: fix possible crash introduced in r47992 #62711a2bb8.

git-svn-id: trunk@47993 -
This commit is contained in:
bart 2015-02-25 19:10:32 +00:00
parent 62711a2bb8
commit 01b55f14dc

View File

@ -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;