diff options
-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() ) ); |