diff options
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/menufloatingwindow.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 3fb24dd89ff2..a9fc9b4814e8 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -1116,9 +1116,9 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) if (pData && accel) { Menu *men = pMenu; - while (!men->IsMenuBar()) + while (men && !men->IsMenuBar()) men = men->pStartedFrom; - bConsume = (static_cast<MenuBarWindow*>(men->pWindow.get()))->GetMBWMenuKey(); + bConsume = !men || (static_cast<MenuBarWindow*>(men->pWindow.get()))->GetMBWMenuKey(); } if (bConsume) { |