Kaydet (Commit) 1fb6688e authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1311650 Dereference after null check

Change-Id: I06e9c28f49f4231a02a7f21940ea55ef41836b67
üst fd14aa9d
......@@ -1111,11 +1111,16 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
sal_uInt16 nDuplicates = 0;
MenuItemData* pData = (nCharCode && pMenu) ?
pMenu->GetItemList()->SearchItem(nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem) : NULL;
bool bConsume = false;
bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
Menu *men = pMenu;
while (!men->IsMenuBar())
men = men->pStartedFrom;
if ( pData && (static_cast<MenuBarWindow*>(men->pWindow.get()))->GetMBWMenuKey () && accel )
if (pData && accel)
{
Menu *men = pMenu;
while (!men->IsMenuBar())
men = men->pStartedFrom;
bConsume = (static_cast<MenuBarWindow*>(men->pWindow.get()))->GetMBWMenuKey();
}
if (bConsume)
{
if ( pData->pSubMenu || nDuplicates > 1 )
{
......
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