mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 07:29:30 +02:00
IDE: Fix crash when TContainedAction instead of TCustomAction is added to ActionList. Issue #20242, patch from Andrew G. Khodotov
git-svn-id: trunk@32355 -
This commit is contained in:
parent
ad2d7983d8
commit
ae9dead608
@ -734,21 +734,18 @@ begin
|
||||
ACanvas.Brush.Color := clHighlight;
|
||||
ACanvas.Font.Color := clHighlightText;
|
||||
end
|
||||
else
|
||||
begin
|
||||
else begin
|
||||
ACanvas.Brush.Color := clWindow;
|
||||
ACanvas.Font.Color := clWindowText;
|
||||
end;
|
||||
|
||||
AAction := TListBox(Control).Items.Objects[Index] as TCustomAction;
|
||||
S := TListBox(Control).Items[Index];
|
||||
|
||||
R := ARect;
|
||||
dh := R.Bottom - R.Top;
|
||||
ACanvas.FillRect(R);
|
||||
inc(R.Left, 2);
|
||||
if FActionList.Images <> nil then
|
||||
begin
|
||||
if (TListBox(Control).Items.Objects[Index] is TCustomAction)
|
||||
and (FActionList.Images <> nil) then begin
|
||||
AAction := TListBox(Control).Items.Objects[Index] as TCustomAction;
|
||||
S := TListBox(Control).Items[Index];
|
||||
R.Right := R.Left + dh;
|
||||
if AAction.ImageIndex <> -1 then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user