should be:

if (!_window->menuBar())  {