LCL: Prevent a crash when freeing a DBEdit with focus. Issue #27178, patch from Petr-K.

git-svn-id: trunk@62288 -
This commit is contained in:
juha 2019-11-23 22:12:41 +00:00
parent aef6a43ae0
commit 7b46b7ced2

View File

@ -222,9 +222,8 @@ end;
procedure TDBEdit.WMKillFocus(var Message: TLMKillFocus);
begin
inherited WMKillFocus(Message);
FFocusedDisplay := False;
if csDestroying in ComponentState then Exit;
if FDatalink.Editing then
begin
FDatalink.UpdateRecord;