lcl: carbon: fixed crash on draw item

git-svn-id: trunk@41335 -
This commit is contained in:
mattias 2013-05-20 20:57:26 +00:00
parent b823ce32cf
commit c8408ddee7

View File

@ -1971,6 +1971,8 @@ procedure TCarbonListBox.DrawItem(AIndex: Integer; AState: DataBrowserItemState)
var
DrawStruct: TDrawListItemStruct;
begin
if AIndex >= TCustomListBox(LCLObject).Items.Count then exit;
DrawStruct.Area := GetItemRect(AIndex);
DrawStruct.DC := HDC(Context);
DrawStruct.ItemID := AIndex;