Fix crash when sending programmatic event to a Views-hosted browser window.

The |web_contents_| member was nullptr in CefBrowserPlatformDelegateNativeAura
when calling methods like SendKeyEvent from CefBrowserPlatformDelegateViews.
This commit is contained in:
Marshall Greenblatt
2020-09-15 11:03:38 -04:00
parent 6c5d52fb54
commit eecf45514c
4 changed files with 12 additions and 4 deletions

View File

@@ -225,6 +225,8 @@ int CefBrowserPlatformDelegateNativeAura::TranslateUiChangedButtonFlags(
content::RenderWidgetHostViewAura*
CefBrowserPlatformDelegateNativeAura::GetHostView() const {
if (!web_contents_)
return nullptr;
return static_cast<content::RenderWidgetHostViewAura*>(
web_contents_->GetRenderWidgetHostView());
}