mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
views: cefclient: Fix crash when ID_MENU_BUTTON doesn't exist
This commit is contained in:
@@ -1350,12 +1350,12 @@ void ViewsWindow::SetMenuFocusable(bool focusable) {
|
||||
|
||||
if (menu_bar_) {
|
||||
menu_bar_->SetMenuFocusable(focusable);
|
||||
} else {
|
||||
window_->GetViewForID(ID_MENU_BUTTON)->SetFocusable(focusable);
|
||||
} else if (menu_button_) {
|
||||
menu_button_->SetFocusable(focusable);
|
||||
|
||||
if (focusable) {
|
||||
// Give focus to menu button.
|
||||
window_->GetViewForID(ID_MENU_BUTTON)->RequestFocus();
|
||||
menu_button_->RequestFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user