diff options
Diffstat (limited to 'framework/source/helper/popupmenucontrollerbase.cxx')
-rw-r--r-- | framework/source/helper/popupmenucontrollerbase.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/source/helper/popupmenucontrollerbase.cxx b/framework/source/helper/popupmenucontrollerbase.cxx index 7a768b11a32d..af46386edb35 100644 --- a/framework/source/helper/popupmenucontrollerbase.cxx +++ b/framework/source/helper/popupmenucontrollerbase.cxx @@ -186,7 +186,9 @@ void SAL_CALL PopupMenuControllerBase::highlight( const css::awt::MenuEvent& ) t void PopupMenuControllerBase::impl_select(const Reference< XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL) { Sequence<PropertyValue> aArgs; - _xDispatch->dispatch( aURL, aArgs ); + OSL_ENSURE(_xDispatch.is(),"PopupMenuControllerBase::impl_select: No dispatch"); + if ( _xDispatch.is() ) + _xDispatch->dispatch( aURL, aArgs ); } void SAL_CALL PopupMenuControllerBase::select( const css::awt::MenuEvent& rEvent ) throw (RuntimeException) @@ -204,7 +206,7 @@ void SAL_CALL PopupMenuControllerBase::select( const css::awt::MenuEvent& rEvent xServiceManager = m_xServiceManager; aLock.unlock(); - if ( xPopupMenu.is() && xDispatch.is() ) + if ( xPopupMenu.is() ) { VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXPopupMenu::GetImplementation( xPopupMenu ); if ( pPopupMenu ) |