From 1fd1b320c297f2bbeb0e8ed69a5ce9dcb20694b2 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 19 Jul 2019 15:16:59 -0700 Subject: [PATCH] Fix crash when showing views context menu --- libcef/browser/views/window_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcef/browser/views/window_impl.cc b/libcef/browser/views/window_impl.cc index 523e95483..20cadc071 100644 --- a/libcef/browser/views/window_impl.cc +++ b/libcef/browser/views/window_impl.cc @@ -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(anchor_position), ui::MENU_SOURCE_NONE);