You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-22 22:17:48 +02:00
Browser can be destroyed while in event. Do not access after that.
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user