Fix crash when showing views context menu

This commit is contained in:
Marshall Greenblatt 2019-07-19 15:16:59 -07:00
parent 1669c0afbd
commit 1fd1b320c2
1 changed files with 1 additions and 1 deletions

View File

@ -437,7 +437,7 @@ void CefWindowImpl::ShowMenu(views::MenuButton* menu_button,
base::Bind(&CefWindowImpl::MenuClosed, this)));
menu_runner_->RunMenuAt(
widget_, menu_button->button_controller(),
widget_, menu_button ? menu_button->button_controller() : nullptr,
gfx::Rect(gfx::Point(screen_point.x, screen_point.y), gfx::Size()),
static_cast<views::MenuAnchorPosition>(anchor_position),
ui::MENU_SOURCE_NONE);