mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
fix(developer): handle window already destroyed when closing editor
Fixes: #15617 Fixes: KEYMAN-DEVELOPER-1JD Fixes: KEYMAN-DEVELOPER-36K Fixes: KEYMAN-DEVELOPER-2P5 Test-bot: skip
This commit is contained in:
parent
bc546d004c
commit
0bd6f59382
1 changed files with 3 additions and 2 deletions
|
|
@ -303,7 +303,7 @@ end;
|
|||
function TframeCEFHost.HasFocus: Boolean;
|
||||
begin
|
||||
AssertVclThread;
|
||||
Result := cefwp.HandleAllocated and IsChild(cefwp.Handle, GetFocus);
|
||||
Result := Assigned(cefwp) and cefwp.HandleAllocated and IsChild(cefwp.Handle, GetFocus);
|
||||
end;
|
||||
|
||||
procedure TframeCEFHost.Handle_CEF_SHOW(var message: TMessage);
|
||||
|
|
@ -574,7 +574,8 @@ end;
|
|||
procedure TframeCEFHost.Handle_CEF_DESTROY(var Message: TMessage);
|
||||
begin
|
||||
AssertVclThread;
|
||||
cefwp.DestroyChildWindow;
|
||||
if Assigned(cefwp) then
|
||||
cefwp.DestroyChildWindow;
|
||||
FreeAndNil(cefwp);
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue