diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2018-10-21 23:00:35 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-22 12:43:08 +0200 |
commit | 5c147fc5fe0e77838b8e9bebd4ff215a80946980 (patch) | |
tree | 1ed7254a3328ff9608357f7906756971bedcafca | |
parent | 4347b5975283ca1a591b6c3d4559ed360e187022 (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>
-rw-r--r-- | vcl/source/window/menu.cxx | 25 |
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) |