fix: crash on parent window close and focur/blur (#46581)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
ef973971a3
commit
f26645e9ab
2 changed files with 14 additions and 2 deletions
|
@ -219,14 +219,14 @@ void BrowserWindow::CloseImmediately() {
|
|||
}
|
||||
|
||||
void BrowserWindow::Focus() {
|
||||
if (api_web_contents_->IsOffScreen())
|
||||
if (api_web_contents_ && api_web_contents_->IsOffScreen())
|
||||
FocusOnWebView();
|
||||
else
|
||||
BaseWindow::Focus();
|
||||
}
|
||||
|
||||
void BrowserWindow::Blur() {
|
||||
if (api_web_contents_->IsOffScreen())
|
||||
if (api_web_contents_ && api_web_contents_->IsOffScreen())
|
||||
BlurWebView();
|
||||
else
|
||||
BaseWindow::Blur();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue