diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-13 21:03:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-15 10:21:26 +0100 |
commit | bb7dad11e1701c295f6fe9f768f267d094d11ece (patch) | |
tree | fac019878da4978b19c9a69168bb2896a0d54649 | |
parent | 6903b8480956e50a155b42fa42807fb32452bed4 (diff) |
coverity#1213242 Dereference null return value
Change-Id: I23ce35dbeadca1eea4c67d7d70acbf5ce3a82ac8
-rw-r--r-- | framework/source/uielement/popuptoolbarcontroller.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index b324557ece7b..4f0c75cd9fda 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -436,7 +436,8 @@ throw ( css::uno::RuntimeException, std::exception ) ( VCLXPopupMenu * ) VCLXMenu::GetImplementation( m_xPopupMenu ); SolarMutexGuard aSolarMutexGuard; - PopupMenu* pVCLPopupMenu = dynamic_cast< PopupMenu * >( pTkPopupMenu->GetMenu() ); + PopupMenu* pVCLPopupMenu = pTkPopupMenu ? + dynamic_cast< PopupMenu * >( pTkPopupMenu->GetMenu() ) : NULL; if ( pVCLPopupMenu ) pMenuAttributes = reinterpret_cast< MenuConfiguration::Attributes* >( pVCLPopupMenu->GetUserValue( pVCLPopupMenu->GetCurItemId() ) ); |