mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 07:19:19 +02:00
LCL: TWinControl.WndProc LM_SETFOCUS: check csDestroying
git-svn-id: trunk@24418 -
This commit is contained in:
parent
7e0680c59c
commit
e51a89e626
@ -5074,7 +5074,8 @@ begin
|
|||||||
{$IFDEF VerboseFocus}
|
{$IFDEF VerboseFocus}
|
||||||
DebugLn('TWinControl.WndProc LM_SetFocus ',DbgSName(Self));
|
DebugLn('TWinControl.WndProc LM_SetFocus ',DbgSName(Self));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if not (csDestroyingHandle in ControlState) then
|
if (not (csDestroyingHandle in ControlState))
|
||||||
|
and (not (csDestroying in ComponentState)) then
|
||||||
begin
|
begin
|
||||||
Form := GetParentForm(Self);
|
Form := GetParentForm(Self);
|
||||||
if (Form <> nil) and not Form.SetFocusedControl(Self) then Exit;
|
if (Form <> nil) and not Form.SetFocusedControl(Self) then Exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user