LCL-Win32: Remove useless code in TWin32WSCustomPage.DestroyHandle. Issue #35466, patch from Serge Anvarov.

git-svn-id: trunk@61087 -
This commit is contained in:
juha 2019-04-30 12:51:28 +00:00
parent 02e6ee3196
commit 03a5db19e3

View File

@ -130,14 +130,12 @@ end;
class procedure TWin32WSCustomPage.DestroyHandle(const AWinControl: TWinControl);
var
PageIndex, RealIndex: integer;
PageControlHandle: HWND;
begin
// remove tab from pagecontrol only if not pfRemoving is set
// if pfRemoving is set then Tab has been deleted by RemovePage
if (AWinControl.Parent <> nil) and (AWinControl.Parent.HandleAllocated) and
not (pfRemoving in TCustomPageAccess(AWinControl).Flags) then
begin
PageControlHandle := AWinControl.Parent.Handle;
PageIndex := TCustomPage(AWinControl).PageIndex;
RealIndex := TCustomTabControl(AWinControl.Parent).PageToTabIndex(PageIndex);
if RealIndex <> -1 then