LCL: TWinControl.WndProc LM_SETFOCUS: check csDestroying

git-svn-id: trunk@24418 -
This commit is contained in:
mattias 2010-04-04 23:37:59 +00:00
parent 7e0680c59c
commit e51a89e626

View File

@ -5074,7 +5074,8 @@ begin
{$IFDEF VerboseFocus}
DebugLn('TWinControl.WndProc LM_SetFocus ',DbgSName(Self));
{$ENDIF}
if not (csDestroyingHandle in ControlState) then
if (not (csDestroyingHandle in ControlState))
and (not (csDestroying in ComponentState)) then
begin
Form := GetParentForm(Self);
if (Form <> nil) and not Form.SetFocusedControl(Self) then Exit;