mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 07:37:24 +01:00
cocoa: preventing range check error on a tab removal
git-svn-id: trunk@61424 -
This commit is contained in:
parent
285f0d4cb6
commit
860c292e15
@ -585,11 +585,11 @@ end;
|
||||
class procedure TCocoaWSCustomPage.DestroyHandle(const AWinControl: TWinControl);
|
||||
var
|
||||
tv: TCocoaTabPageView;
|
||||
ndx: Integer;
|
||||
ndx: NSInteger;
|
||||
begin
|
||||
tv := TCocoaTabPageView(AWinControl.Handle);
|
||||
ndx := tv.tabView.exttabIndexOfTabViewItem(tv.tabPage);
|
||||
if ndx >= 0 then
|
||||
if (ndx >= 0) and (ndx < tv.tabView.fulltabs.count) then
|
||||
tv.tabview.exttabRemoveTabViewItem(tv.tabPage);
|
||||
TCocoaWSWinControl.DestroyHandle(AWinControl);
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user