From f8834c063ac51a559ed1f6491f1cb8e6cbe3f57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salvador=20D=C3=ADaz=20Fau?= Date: Sun, 12 Oct 2025 18:00:36 +0200 Subject: [PATCH] Fixed possible access violation in Lazarus_Linux_QT6/SimpleBrowser --- demos/Lazarus_Linux_QT6/SimpleBrowser/umainform.pas | 5 +++-- update_CEF4Delphi.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/demos/Lazarus_Linux_QT6/SimpleBrowser/umainform.pas b/demos/Lazarus_Linux_QT6/SimpleBrowser/umainform.pas index c453dfb1..1193651d 100644 --- a/demos/Lazarus_Linux_QT6/SimpleBrowser/umainform.pas +++ b/demos/Lazarus_Linux_QT6/SimpleBrowser/umainform.pas @@ -174,7 +174,7 @@ begin FClosing := True; Visible := False; Chromium1.CloseBrowser(True); - CEFLinkedWindowParent1.Free; + FreeAndNil(CEFLinkedWindowParent1); end; end; {%Endregion} @@ -219,7 +219,8 @@ end; procedure TMainForm.BrowserSetFocusMsg(Data: PtrInt); begin - CEFLinkedWindowParent1.SetFocus; + if assigned(CEFLinkedWindowParent1) then + CEFLinkedWindowParent1.SetFocus; end; procedure TMainForm.WMMove(var Message: TLMMove); diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index 903a04c6..1f91fe6a 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,7 +2,7 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 799, + "InternalVersion" : 800, "Name" : "cef4delphi_lazarus.lpk", "Version" : "140.1.14" }