summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-07-13 11:33:27 +0200
committerEike Rathke <erack@redhat.com>2015-07-13 11:51:43 +0200
commit5a247505a36ccdb911e48f0d859572f56ec4b171 (patch)
tree046c6081dd3d05aef20a730be5524f48d22d6e48
parent1f99f4a9c816cc106bfbdf229e4ec2bffb343847 (diff)
don't crash on Shift+F10, men can be null, tdf#92630 follow-up
... and actually make this work with a context menu.. Change-Id: I9a9bcdccae859cb2a54ec7db442435215e21e0e0
-rw-r--r--vcl/source/window/menufloatingwindow.cxx4
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)
{