destructor TNxTabSheet.Destroy;
begin
FreeAndNil(FGlyph);
FreeAndNil(FTabFont);
if Assigned(FPageControl) then
FPageControl.RemovePage(Self);
FPageControl.RemovePage(Self);
inherited;
end;
The second "FPageControl.RemovePage(Self)" sometimes causes an index out of range exception (-1).
I commented out the one without the check that it's assigned, and it doesn't do it anymore.