[Libreoffice-commits] core.git: vcl/source

Eike Rathke erack at redhat.com
Mon Jul 13 02:52:28 PDT 2015


 vcl/source/window/menufloatingwindow.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5a247505a36ccdb911e48f0d859572f56ec4b171
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jul 13 11:33:27 2015 +0200

    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

diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 3fb24dd..a9fc9b4 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)
             {


More information about the Libreoffice-commits mailing list