fix: race condition where webContents can be nullptr during re-focus and a multi-window close sequence (#33284)

* 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

Co-authored-by: Samuel Attard <sam@electronjs.org>
This commit is contained in:
trop[bot]
2022-03-21 10:26:49 +09:00
committed by GitHub
parent 46d74390fc
commit 388acd7e2a

View File

@@ -266,6 +266,8 @@
inspectableWebContentsView_->inspectable_web_contents();
DCHECK(inspectable_web_contents);
auto* webContents = inspectable_web_contents->GetWebContents();
if (!webContents)
return;
auto* webContentsView = webContents->GetNativeView().GetNativeNSView();
NSView* view = [notification object];