Cocoa: fix range check error in TCocoaWSCustomTabControl.GetTabRect()

This commit is contained in:
rich2014 2024-01-14 23:30:59 +08:00
parent a4ab5f4aa2
commit 5a5e92008b

View File

@ -820,7 +820,7 @@ var
lTabPage: NSTabViewItem;
tb : TCocoaTabPageView;
i : integer;
idx : integer;
idx : NSUInteger;
tr : TRect;
w : array of Double;
mw : Double;
@ -838,7 +838,7 @@ begin
if not Assigned(tb) then Exit;
idx := lTabControl.tabViewItems.indexOfObject( tb.tabPage );
if (idx = Integer(NSNotFound)) then Exit;
if idx = NSNotFound then Exit;
if not GetTabsRect(lTabControl, tr) then Exit;