mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 15:16:10 +02:00
cocoa: additional check on processing tab switch event. Need to investigate why a page view doesn't have any subview
git-svn-id: trunk@58514 -
This commit is contained in:
parent
fb5dac044d
commit
f0aa55068a
@ -236,12 +236,18 @@ var
|
||||
begin
|
||||
Result:=aTabIndex;
|
||||
if not Assigned(trg) or not (trg is TCustomTabControl) then Exit;
|
||||
if (aTabIndex<0) or (atabIndex>=src.fulltabs.count) then begin
|
||||
if (aTabIndex<0) or (atabIndex>=src.fulltabs.count) then
|
||||
begin
|
||||
aTabIndex:=-1;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
tbitem:=TCocoaTabPage(src.fulltabs.objectAtIndex(aTabIndex));
|
||||
if NSView(tbitem.view).subviews.count=0 then
|
||||
begin
|
||||
aTabIndex:=-1;
|
||||
Exit;
|
||||
end;
|
||||
hnd := HWND(NSView(tbitem.view).subviews.objectAtIndex(0));
|
||||
|
||||
tb:=TCustomTabControl(trg);
|
||||
|
Loading…
Reference in New Issue
Block a user