* **Electron Version** (output of `node_modules/.bin/electron --version`):
  * 5.0.0-beta.2
* **Operating System** (Platform and Version):
  * Windows 7 Professional (SP1)

### Expected Behavior
Not crash

### Actual behavior
Crash 3221225477

### To Reproduce
https://github.com/Gvozd/electron-quick-start/tree/issue-16883
based on electron-quick-start. only updated electron to 5.0.0-beta.2
try to open devtools from menu - crash

atom/browser/ui/views/menu_bar.cc
: menu_bar_(menu_bar) {}
MenuBarColorUpdater::~MenuBarColorUpdater() {}
void MenuBarColorUpdater::OnDidChangeFocus(views::View* focused_before,
                                           views::View* focused_now) {
  if (menu_bar_) {
    
    const auto had_focus = menu_bar_->has_focus_;
    menu_bar_->has_focus_ = focused_now != nullptr;
    if (menu_bar_->has_focus_ != had_focus)
      menu_bar_->UpdateViewColors();
  }
}
MenuBar::MenuBar(RootView* window)
    : background_color_(kDefaultColor),
      window_(window),
      color_updater_(new MenuBarColorUpdater(this)) {
  RefreshColorCache();
  UpdateViewColors();
  SetFocusBehavior(FocusBehavior::ALWAYS);
  SetLayoutManager(
      std::make_unique<views::BoxLayout>(views::BoxLayout::kHorizontal));
  window_->GetFocusManager()->AddFocusChangeListener(color_updater_.get());
}
MenuBar::~MenuBar() {