mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 05:56:05 +02:00
lcl: carbon: fixed crash on draw item
git-svn-id: trunk@41335 -
This commit is contained in:
parent
b823ce32cf
commit
c8408ddee7
@ -1971,6 +1971,8 @@ procedure TCarbonListBox.DrawItem(AIndex: Integer; AState: DataBrowserItemState)
|
|||||||
var
|
var
|
||||||
DrawStruct: TDrawListItemStruct;
|
DrawStruct: TDrawListItemStruct;
|
||||||
begin
|
begin
|
||||||
|
if AIndex >= TCustomListBox(LCLObject).Items.Count then exit;
|
||||||
|
|
||||||
DrawStruct.Area := GetItemRect(AIndex);
|
DrawStruct.Area := GetItemRect(AIndex);
|
||||||
DrawStruct.DC := HDC(Context);
|
DrawStruct.DC := HDC(Context);
|
||||||
DrawStruct.ItemID := AIndex;
|
DrawStruct.ItemID := AIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user