Kaydet (Commit) 5a247505 authored tarafından Eike Rathke's avatar Eike Rathke

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
üst 1f99f4a9
...@@ -1116,9 +1116,9 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) ...@@ -1116,9 +1116,9 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
if (pData && accel) if (pData && accel)
{ {
Menu *men = pMenu; Menu *men = pMenu;
while (!men->IsMenuBar()) while (men && !men->IsMenuBar())
men = men->pStartedFrom; men = men->pStartedFrom;
bConsume = (static_cast<MenuBarWindow*>(men->pWindow.get()))->GetMBWMenuKey(); bConsume = !men || (static_cast<MenuBarWindow*>(men->pWindow.get()))->GetMBWMenuKey();
} }
if (bConsume) if (bConsume)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment