diff --git a/lcl/lclmessageglue.pas b/lcl/lclmessageglue.pas index d08271b507..841fa4f5ec 100644 --- a/lcl/lclmessageglue.pas +++ b/lcl/lclmessageglue.pas @@ -101,12 +101,12 @@ begin {$ENDIF} RefCounted := False; try - if Target is TLCLComponent then - begin - TLCLComponent(Target).IncLCLRefCount; - RefCounted := True; - end; try + if Target is TLCLComponent then + begin + TLCLComponent(Target).IncLCLRefCount; + RefCounted := True; + end; if Target is TControl then TControl(Target).WindowProc(TLMessage(AMessage)) else