The original TNxTabSheet.Destroy code:
destructor TNxTabSheet.Destroy; begin FreeAndNil(FGlyph); FreeAndNil(FTabFont); FPageControl.RemovePage(Self); inherited; end;
The fix:
destructor TNxTabSheet.Destroy; begin FreeAndNil(FGlyph); FreeAndNil(FTabFont); if FPageControl <> nil then // Edwin: 2020-01-09 FPageControl.RemovePage(Self); inherited; end;
The the issue exists?
You create a new tab at runtime like this:
1 - call TNxTabSheet.Create(aOwner); 2 - then call TNxPageControl.AddPage
In case there is an exception happened in between step 1 and 2, when aOwner trying to free the TNxTabSheet, Access Violation will happen.
Please apply the fix to the library. Thanks.