Skip to content

Commit

Permalink
fix: race condition where webContents can be nullptr during re-focus …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
trop[bot] and MarshallOfSound committed Mar 16, 2022
1 parent f79ee8a commit f20f1b1
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -266,6 +266,8 @@ - (void)viewDidBecomeFirstResponder:(NSNotification*)notification {
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];
Expand Down

0 comments on commit f20f1b1

Please sign in to comment.