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:
Samuel Attard
2022-03-15 10:45:56 -07:00
committed by GitHub
parent 7382891015
commit c8a3a00017

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