Skip to content

Commit ab6ff3c

Browse files
committed
Fix getting new windows
1 parent b54c2e7 commit ab6ff3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nw_shell.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,8 @@ void Shell::WebContentsCreated(WebContents* source_contents,
594594
#if defined(OS_WIN)
595595
void Shell::WebContentsFocused(content::WebContents* web_contents) {
596596
NativeWindowWin* win = static_cast<NativeWindowWin*>(window_.get());
597-
win->web_view_->OnWebContentsFocused(web_contents);
597+
if (win) // on aura this function is called in the middle of window creation
598+
win->web_view_->OnWebContentsFocused(web_contents);
598599
}
599600
#endif
600601

0 commit comments

Comments
 (0)