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;
|
function TChromiumCore.doOnClose(const browser: ICefBrowser): Boolean;
|
||||||
var
|
var
|
||||||
TempAction : TCefCloseBrowserAction;
|
TempAction : TCefCloseBrowserAction;
|
||||||
|
id: Integer;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
TempAction := cbaClose;
|
TempAction := cbaClose;
|
||||||
|
id := browser.Identifier;
|
||||||
|
|
||||||
// TempAction values
|
// TempAction values
|
||||||
// -----------------
|
// -----------------
|
||||||
@ -5205,11 +5207,11 @@ begin
|
|||||||
cbaDelay :
|
cbaDelay :
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
SetBrowserIsClosing(browser.Identifier);
|
SetBrowserIsClosing(id);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
else
|
else
|
||||||
SetBrowserIsClosing(browser.Identifier);
|
SetBrowserIsClosing(id);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user