Fixes crash caused by NativeWindow::IsWebViewFocused.
The RenderViewHostView could be NULL when the renderer process has crashed. Fixes #206.
This commit is contained in:
parent
3260b42b18
commit
337e9f9553
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue