fix: race condition where webContents can be nullptr during re-focus and a multi-window close sequence (#33063)
* fix: race condition where webContents can be nullptr during re-focus and a multi-window close sequence * chore: update electron_inspectable_web_contents_view.mm
This commit is contained in:
parent
7382891015
commit
c8a3a00017
1 changed files with 2 additions and 0 deletions
|
@ -266,6 +266,8 @@
|
||||||
inspectableWebContentsView_->inspectable_web_contents();
|
inspectableWebContentsView_->inspectable_web_contents();
|
||||||
DCHECK(inspectable_web_contents);
|
DCHECK(inspectable_web_contents);
|
||||||
auto* webContents = inspectable_web_contents->GetWebContents();
|
auto* webContents = inspectable_web_contents->GetWebContents();
|
||||||
|
if (!webContents)
|
||||||
|
return;
|
||||||
auto* webContentsView = webContents->GetNativeView().GetNativeNSView();
|
auto* webContentsView = webContents->GetNativeView().GetNativeNSView();
|
||||||
|
|
||||||
NSView* view = [notification object];
|
NSView* view = [notification object];
|
||||||
|
|
Loading…
Reference in a new issue