From 1d8300910892470606d7d2397a122331cb2e8f7a Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 20 Oct 2016 09:17:04 +0000 Subject: [PATCH] LCL: fixed invalid typecast, breaking option -CR git-svn-id: trunk@53175 - --- lcl/include/wincontrol.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lcl/include/wincontrol.inc b/lcl/include/wincontrol.inc index fa371664c6..ee5216dc4f 100644 --- a/lcl/include/wincontrol.inc +++ b/lcl/include/wincontrol.inc @@ -5255,7 +5255,7 @@ end; procedure TWinControl.DestroyHandle; var i: integer; - AWinControl: TWinControl; + AControl: TControl; begin //DebugLn(['TWinControl.DestroyHandle START ',DbgSName(Self)]); if not HandleAllocated then begin @@ -5270,9 +5270,9 @@ begin if FControls <> nil then begin for i:= 0 to FControls.Count - 1 do begin //DebugLn([' ',i,' ',DbgSName(TObject(FWinControls[i]))]); - AWinControl:=TWinControl(FControls[i]); - if (AWinControl is TWinControl) and AWinControl.HandleAllocated then - AWinControl.DestroyHandle; + AControl:=TControl(FControls[i]); + if (AControl is TWinControl) and TWinControl(AControl).HandleAllocated then + TWinControl(AControl).DestroyHandle; end; end; //DebugLn(['TWinControl.DestroyHandle DESTROY SELF ',DbgSName(Self)]);