diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-10 10:06:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-10 21:12:55 +0100 |
commit | 989791341686cd143545aa3f1610920145049f10 (patch) | |
tree | 09dc7aeac6990c5c32a9ae72e3db5cfc7b2f74e5 /framework | |
parent | 3e40e67b09a9ab46bd4dc3a7df29135f6726b02e (diff) |
coverity#1213247 Dereference null return value
Change-Id: I039536322fd1c9c786c4cd7088807aee7e2e929d
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/controlmenucontroller.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index d7446a11f369..2604b66f26ac 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -321,10 +321,13 @@ void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Eve } } + VCLXPopupMenu* pPopupMenu = NULL; + if ( nMenuId ) - { - VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( m_xPopupMenu ); + pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( m_xPopupMenu ); + if (pPopupMenu) + { SolarMutexGuard aSolarMutexGuard; PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); |