summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2018-10-21 23:00:35 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-10-22 12:43:08 +0200
commit5c147fc5fe0e77838b8e9bebd4ff215a80946980 (patch)
tree1ed7254a3328ff9608357f7906756971bedcafca /vcl
parent4347b5975283ca1a591b6c3d4559ed360e187022 (diff)
tdf#120703 (PVS): Recurring check.
V571 The '!aDelData.isDeleted()' condition was already verified in line 359. Change-Id: Ie66aa65c024e30d34a4b0766ddad3fa24ce98644 Reviewed-on: https://gerrit.libreoffice.org/62163 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/menu.cxx25
1 files changed, 12 insertions, 13 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ba1138205a29..bcbca81b7c01 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -356,19 +356,18 @@ void Menu::Select()
ImplMenuDelData aDelData( this );
ImplCallEventListeners( VclEventId::MenuSelect, GetItemPos( GetCurItemId() ) );
- if ( !aDelData.isDeleted() && !aSelectHdl.Call( this ) )
- {
- if( !aDelData.isDeleted() )
- {
- Menu* pStartMenu = ImplGetStartMenu();
- if ( pStartMenu && ( pStartMenu != this ) )
- {
- pStartMenu->nSelectedId = nSelectedId;
- pStartMenu->sSelectedIdent = sSelectedIdent;
- pStartMenu->aSelectHdl.Call( this );
- }
- }
- }
+ if (aDelData.isDeleted())
+ return;
+ if (aSelectHdl.Call(this))
+ return;
+ if (aDelData.isDeleted())
+ return;
+ Menu* pStartMenu = ImplGetStartMenu();
+ if (!pStartMenu || (pStartMenu == this))
+ return;
+ pStartMenu->nSelectedId = nSelectedId;
+ pStartMenu->sSelectedIdent = sSelectedIdent;
+ pStartMenu->aSelectHdl.Call( this );
}
#if defined(MACOSX)