1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-01-13 10:22:04 +02:00

Browser can be destroyed while in event. Do not access after that.

This commit is contained in:
martin 2021-02-24 05:11:29 +01:00
parent 2838b7964e
commit cee41f519b

View File

@ -5184,9 +5184,11 @@ end;
function TChromiumCore.doOnClose(const browser: ICefBrowser): Boolean;
var
TempAction : TCefCloseBrowserAction;
id: Integer;
begin
Result := False;
TempAction := cbaClose;
id := browser.Identifier;
// TempAction values
// -----------------
@ -5205,11 +5207,11 @@ begin
cbaDelay :
begin
Result := True;
SetBrowserIsClosing(browser.Identifier);
SetBrowserIsClosing(id);
end;
else
SetBrowserIsClosing(browser.Identifier);
SetBrowserIsClosing(id);
end;
end;