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

* 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-16 09:57:37 -04:00
committed by GitHub
parent f79ee8ac3f
commit f20f1b176f

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];