mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 17:56:16 +02:00
Fix list out of bounds exception if TabOrderList is empty
git-svn-id: trunk@47213 -
This commit is contained in:
parent
c95dfb9e93
commit
acfee8fe08
@ -1096,6 +1096,8 @@ begin
|
||||
lList := TFPList.Create;
|
||||
try
|
||||
AWinControl.GetTabOrderList(lList);
|
||||
if lList.Count>0 then
|
||||
begin
|
||||
prevControl := TWinControl(lList.Items[lList.Count-1]);
|
||||
lPrevView := GetNSObjectView(NSObject(prevControl.Handle));
|
||||
for i := 0 to lList.Count-1 do
|
||||
@ -1108,6 +1110,7 @@ begin
|
||||
|
||||
lPrevView := lCurView;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
lList.Free;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user