cocoa: checking the presence of tabview before removing it

git-svn-id: trunk@61070 -
This commit is contained in:
dmitry 2019-04-28 17:47:45 +00:00
parent ee04fcba3b
commit 4c2e6c3028

View File

@ -599,8 +599,12 @@ begin
end;
procedure TCocoaTabControl.exttabRemoveTabViewItem(lTabPage: NSTabViewItem);
var
idx : NSInteger;
begin
removeTabViewItem(lTabPage);
idx := indexOfTabViewItem(lTabPage);
if (idx>=0) and (idx<>NSNotFound) then
removeTabViewItem(lTabPage);
fulltabs.removeObject(lTabPage);