mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fixes crash caused by NativeWindow::IsWebViewFocused.
The RenderViewHostView could be NULL when the renderer process has crashed. Fixes #206.
This commit is contained in:
@@ -231,7 +231,9 @@ void NativeWindow::BlurWebView() {
|
||||
}
|
||||
|
||||
bool NativeWindow::IsWebViewFocused() {
|
||||
return GetWebContents()->GetRenderViewHost()->GetView()->HasFocus();
|
||||
content::RenderWidgetHostView* host_view =
|
||||
GetWebContents()->GetRenderViewHost()->GetView();
|
||||
return host_view && host_view->HasFocus();
|
||||
}
|
||||
|
||||
bool NativeWindow::SetIcon(const std::string& str_path) {
|
||||
|
||||
Reference in New Issue
Block a user